#include <Pt/Gfx/Transform.h>
Affine transform for drawing coordinates. More...
Public Member Functions | |
| Transform () | |
| Constructs the identity transform. | |
| Transform (double m11, double m12, double m21, double m22, double dx, double dy) | |
| Constructs a transform from explicit matrix components. | |
| ~Transform () | |
| Destroys the transform. | |
| bool | isIdentity () const |
| Returns true if the transform is the identity matrix. | |
| bool | isAffine () const |
| Returns true if the transform is affine. | |
| bool | isSimple () const |
| Returns true if the matrix is only translating and scaling. | |
| double | m11 () const |
| Returns the first row, first column coefficient. | |
| double | m12 () const |
| Returns the first row, second column coefficient. | |
| double | m21 () const |
| Returns the second row, first column coefficient. | |
| double | m22 () const |
| Returns the second row, second column coefficient. | |
| double | dx () const |
| Returns the horizontal translation. | |
| double | dy () const |
| Returns the vertical translation. | |
| void | reset () |
| Resets the transform to identity. | |
| void | set (double m11, double m12, double m21, double m22, double dx, double dy) |
| Replaces the matrix coefficients. | |
| void | translate (double x, double y) |
| Appends a translation. | |
| void | scale (double x, double y) |
| Appends a scaling. | |
| void | rotateDeg (double angle) |
| Appends a rotation specified in degrees. | |
| void | rotateRad (double angle) |
| Appends a rotation specified in radians. | |
| void | shear (double sh, double sv) |
| Appends horizontal and vertical shearing. | |
| void | shearX (double sh) |
| Appends horizontal shearing. | |
| void | shearY (double sh) |
| Appends vertical shearing. | |
| bool | operator== (const Transform &t) const |
| Returns true if both transforms are equal. | |
| bool | operator!= (const Transform &t) const |
| Returns true if both transforms are different. | |
| Transform & | operator*= (const Transform &t) |
| Appends another transform in place. | |
| Transform | operator* (const Transform &t) const |
| Returns the composition of two transforms. | |
| PointF | operator* (const PointF &p) const |
| Transforms a point. | |
| SizeF | operator* (const SizeF &p) const |
| Transforms a size. | |
| double | determinant () const |
| Returns the matrix determinant. | |
| bool | isInvertible () const |
| Returns true if the transform can be inverted. | |
| Transform | inverted () const |
| Returns the inverse transform. | |
Transform stores the matrix used to map logical drawing coordinates to the coordinate system of the target. It can be composed from translation, scaling, rotation and shear operations and is used by painters, paths and text drawing.