iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
IMatrix Struct Reference

Used to store transformation matrices. More...

#include <IGraphicsStructs.h>

Public Member Functions

 IMatrix (double xx, double yx, double xy, double yy, double tx, double ty)
 Create an IMatrix, specifying the values. More...
 
 IMatrix ()
 Create an identity matrix. More...
 
IMatrixTranslate (float x, float y)
 Set the matrix for a translation transform. More...
 
IMatrixScale (float x, float y)
 Set the matrix for a scale transform. More...
 
IMatrixRotate (float a)
 Set the matrix for a rotation transform. More...
 
IMatrixSkew (float xa, float ya)
 Set the matrix for a skew transform. More...
 
void TransformPoint (double &x, double &y, double x0, double y0) const
 Transforms the point x, y. More...
 
void TransformPoint (double &x, double &y) const
 Transforms the point x, y with the matrix. More...
 
IMatrixTransform (const IRECT &before, const IRECT &after)
 
IMatrixTransform (const IMatrix &m)
 Transform this matrix with another. More...
 
IMatrixInvert ()
 Changes the matrix to be the inverse of its original value. More...
 

Public Attributes

double mXX
 
double mYX
 
double mXY
 
double mYY
 
double mTX
 
double mTY
 

Detailed Description

Used to store transformation matrices.

Definition at line 1987 of file IGraphicsStructs.h.

Constructor & Destructor Documentation

◆ IMatrix() [1/2]

IMatrix::IMatrix ( double  xx,
double  yx,
double  xy,
double  yy,
double  tx,
double  ty 
)
inline

Create an IMatrix, specifying the values.

Parameters
xxxx component of the affine transformation
yxyx component of the affine transformation
xyxy component of the affine transformation
yyyy component of the affine transformation
txX translation component of the affine transformation
tyY translation component of the affine transformation

Definition at line 1996 of file IGraphicsStructs.h.

◆ IMatrix() [2/2]

IMatrix::IMatrix ( )
inline

Create an identity matrix.

Definition at line 2001 of file IGraphicsStructs.h.

Referenced by Rotate(), Scale(), Skew(), Transform(), and Translate().

Member Function Documentation

◆ Invert()

IMatrix & IMatrix::Invert ( )
inline

Changes the matrix to be the inverse of its original value.

Returns
IMatrix& The changed matrix

Definition at line 2095 of file IGraphicsStructs.h.

◆ Rotate()

IMatrix & IMatrix::Rotate ( float  a)
inline

Set the matrix for a rotation transform.

Parameters
aThe angle of rotation in degrees
Returns
IMatrix& The matrix

Definition at line 2025 of file IGraphicsStructs.h.

References IMatrix(), and Transform().

Referenced by IGraphics::CalculateTextRotation(), and IGraphics::PathTransformRotate().

◆ Scale()

IMatrix & IMatrix::Scale ( float  x,
float  y 
)
inline

Set the matrix for a scale transform.

Parameters
xThe scale for x
yThe scale for y
Returns
IMatrix& The matrix

Definition at line 2017 of file IGraphicsStructs.h.

References IMatrix(), and Transform().

Referenced by IGraphics::PathTransformScale().

◆ Skew()

IMatrix & IMatrix::Skew ( float  xa,
float  ya 
)
inline

Set the matrix for a skew transform.

Parameters
xaThe angle to skew x coordinates in degrees
yaThe angle to skew y coordinates in degrees
Returns
IMatrix& The matrix

Definition at line 2038 of file IGraphicsStructs.h.

References IMatrix(), and Transform().

Referenced by IGraphics::PathTransformSkew().

◆ Transform() [1/2]

IMatrix & IMatrix::Transform ( const IMatrix m)
inline

Transform this matrix with another.

Parameters
mThe matrix with which to transform this one
Returns
IMatrix& The result of the transform

Definition at line 2079 of file IGraphicsStructs.h.

◆ Transform() [2/2]

IMatrix & IMatrix::Transform ( const IRECT before,
const IRECT after 
)
inline
Todo:
Parameters
before
Todo:
Parameters
after
Todo:
Returns
IMatrix& The result of the transform

Definition at line 2066 of file IGraphicsStructs.h.

References IRECT::H(), IMatrix(), and IRECT::W().

Referenced by IGraphics::PathTransformMatrix(), Rotate(), Scale(), Skew(), and Translate().

◆ TransformPoint() [1/2]

void IMatrix::TransformPoint ( double &  x,
double &  y 
) const
inline

Transforms the point x, y with the matrix.

Parameters
xThe x coordinate to transform
yThe y coordinate to transform

Definition at line 2057 of file IGraphicsStructs.h.

References TransformPoint().

◆ TransformPoint() [2/2]

void IMatrix::TransformPoint ( double &  x,
double &  y,
double  x0,
double  y0 
) const
inline

Transforms the point x, y.

Todo:
Parameters
xThe x coordinate to transform
yThe y coordinate to transform
x0
Todo:
Parameters
y0
Todo:

Definition at line 2048 of file IGraphicsStructs.h.

Referenced by IGraphics::CalculateTextRotation(), and TransformPoint().

◆ Translate()

IMatrix & IMatrix::Translate ( float  x,
float  y 
)
inline

Set the matrix for a translation transform.

Parameters
xThe translation for x values
yThe translation for y values
Returns
IMatrix& The matrix

Definition at line 2008 of file IGraphicsStructs.h.

References IMatrix(), and Transform().

Referenced by IGraphics::PathTransformTranslate().

Member Data Documentation

◆ mTX

double IMatrix::mTX

Definition at line 2111 of file IGraphicsStructs.h.

◆ mTY

double IMatrix::mTY

Definition at line 2111 of file IGraphicsStructs.h.

◆ mXX

double IMatrix::mXX

Definition at line 2111 of file IGraphicsStructs.h.

◆ mXY

double IMatrix::mXY

Definition at line 2111 of file IGraphicsStructs.h.

◆ mYX

double IMatrix::mYX

Definition at line 2111 of file IGraphicsStructs.h.

◆ mYY

double IMatrix::mYY

Definition at line 2111 of file IGraphicsStructs.h.


The documentation for this struct was generated from the following file: