is used for transforming 2D shapes or images.
|
Public Types |
| enum | MatrixElementIndex {
mei00 = 0,
mei01 = 1,
mei02 = 2,
mei10 = 3,
mei11 = 4,
mei12 = 5,
mei20 = 6,
mei21 = 7,
mei22 = 8
} |
| | Use the values of these enums to reference a value of the matrix. More...
|
Public Member Functions |
| | Matrix2D () |
| | Matrix2D (const Matrix2D &matrix) |
| | Matrix2D (const agg::trans_affine &matrix) |
| virtual | ~Matrix2D () |
| void | transpose (Matrix2D *dest) |
| | transposes the matrix
|
| void | reflect (const bool &reflectX, const bool &reflectY) |
| | creates a reflection matrix
|
| void | rotate (const double &theta) |
| | creates a rotation matrix
|
| void | shear (const double &shearX, const double &shearY) |
| | creates a shear matrix
|
| void | scale (const double &scaleX, const double &scaleY) |
| | creates a scale matrix |0|scaleX|0| |scaleY|0|0| |0|0|1|
|
| void | identity () |
| | Creates an identity matrix |1|0|0| |0|1|0| |0|0|1| .
|
| Matrix2D & | multiply (const Matrix2D &rhs) |
| | multiply m1 X this instance
|
| Matrix2D & | premultiply (const Matrix2D &rhs) |
| void | translate (const double &transX, const double &transY) |
| | creates a translation matrix
|
| void | invert () |
| | inverts the current matrix
|
| Point | apply (Point *point) const |
| void | apply (double &x, double &y) const |
| Rect | apply (Rect *rect) const |
| virtual bool | isEqual (Object *object) const |
| | is the current matrix instance equal to the object passed in ? where hopefully the object is a pointer to a Matrix2D instance.
|
| virtual void | copy (Object *source) |
| | copy the data in the Matrix2D source into the current instance.
|
| Matrix2D & | operator= (const Matrix2D &matrix) |
| Matrix2D & | operator= (const agg::trans_affine &matrix) |
| | operator agg::trans_affine () const |
| bool | operator== (const Matrix2D &matrix) const |
| double & | operator[] (MatrixElementIndex index) |
| | subscript operator overload for conveniently accessing the matrix elements.
|
| double | operator[] (MatrixElementIndex index) const |
| Matrix2D & | operator *= (const Matrix2D &rhs) |
| Matrix2D & | operator/= (const Matrix2D &rhs) |
| Matrix2D | operator * (const Matrix2D &rhs) |
| Matrix2D | operator/ (const Matrix2D &rhs) |
| Matrix2D | operator~ () const |
| bool | isIdentity (double epsilon=MatrixEpsilon) const |
| double | getRotation () const |
| double | getScaleX () const |
| double | getScaleY () const |
| double | getTranslateX () const |
| double | getTranslateY () const |
| double | getShearX () const |
| double | getShearY () const |
| void | getScale (double &x, double &y) const |
| void | getTranslation (double &x, double &y) const |
| void | getShear (double &x, double &y) const |
Static Public Member Functions |
| static Matrix2D | rotation (const double &theta) |
| static Matrix2D | translation (const double &x, const double &y) |
| static Matrix2D | scaling (const double &sx, const double &sy) |
| static Matrix2D | shearing (const double &shx, const double ­) |
Protected Attributes |
| double | matrix_ [3][3] |
is used for transforming 2D shapes or images.
This class is intended to represent an affine matrix made up of a 3X3 array of doubles.