Definition at line 65 of file qtransform.h.
#include <qtransform.h>
Public Types |
|
| enum | TransformationType
{ TxNone = 0x00, TxTranslate = 0x01, TxScale = 0x02, TxRotate = 0x04, TxShear = 0x08, TxProject = 0x10 } |
Public Member Functions |
|
| QTransform (Qt::Initialization) | |
| QTransform () | |
| QTransform (qreal h11, qreal h12, qreal h13, qreal h21, qreal h22, qreal h23, qreal h31, qreal h32, qreal h33=1.0) | |
| QTransform (qreal h11, qreal h12, qreal h21, qreal h22, qreal dx, qreal dy) | |
| QTransform (const QMatrix &mtx) | |
| bool | isAffine () const |
| bool | isIdentity () const |
| bool | isInvertible () const |
| bool | isScaling () const |
| bool | isRotating () const |
| bool | isTranslating () const |
| TransformationType | type () const |
| qreal | determinant () const |
| qreal | det () const |
| qreal | m11 () const |
| qreal | m12 () const |
| qreal | m13 () const |
| qreal | m21 () const |
| qreal | m22 () const |
| qreal | m23 () const |
| qreal | m31 () const |
| qreal | m32 () const |
| qreal | m33 () const |
| qreal | dx () const |
| qreal | dy () const |
| void | setMatrix (qreal m11, qreal m12, qreal m13, qreal m21, qreal m22, qreal m23, qreal m31, qreal m32, qreal m33) |
| QTransform | inverted (bool *invertible=0) const |
| QTransform | adjoint () const |
| QTransform | transposed () const |
| QTransform & | translate (qreal dx, qreal dy) |
| QTransform & | scale (qreal sx, qreal sy) |
| QTransform & | shear (qreal sh, qreal sv) |
| QTransform & | rotate (qreal a, Qt::Axis axis=Qt::ZAxis) |
| QTransform & | rotateRadians (qreal a, Qt::Axis axis=Qt::ZAxis) |
| bool | operator== (const QTransform &) const |
| bool | operator!= (const QTransform &) const |
| QTransform & | operator*= (const QTransform &) |
| QTransform | operator* (const QTransform &o) const |
| QTransform & | operator= (const QTransform &) |
| operator QVariant () const | |
| void | reset () |
| QPoint | map (const QPoint &p) const |
| QPointF | map (const QPointF &p) const |
| QLine | map (const QLine &l) const |
| QLineF | map (const QLineF &l) const |
| QPolygonF | map (const QPolygonF &a) const |
| QPolygon | map (const QPolygon &a) const |
| QRegion | map (const QRegion &r) const |
| QPainterPath | map (const QPainterPath &p) const |
| QPolygon | mapToPolygon (const QRect &r) const |
| QRect | mapRect (const QRect &) const |
| QRectF | mapRect (const QRectF &) const |
| void | map (int x, int y, int *tx, int *ty) const |
| void | map (qreal x, qreal y, qreal *tx, qreal *ty) const |
| const QMatrix & | toAffine () const |
| QTransform & | operator*= (qreal div) |
| QTransform & | operator/= (qreal div) |
| QTransform & | operator+= (qreal div) |
| QTransform & | operator-= (qreal div) |
Static Public Member Functions |
|
| static bool | squareToQuad (const QPolygonF &square, QTransform &result) |
| static bool | quadToSquare (const QPolygonF &quad, QTransform &result) |
| static bool | quadToQuad (const QPolygonF &one, const QPolygonF &two, QTransform &result) |
| static QTransform | fromTranslate (qreal dx, qreal dy) |
| static QTransform | fromScale (qreal dx, qreal dy) |
| enum TransformationType |
Definition at line 68 of file qtransform.h.
| QTransform | ( | Qt::Initialization | ) | [inline, explicit] |
Definition at line 77 of file qtransform.h.
: affine(Qt::Uninitialized) {}
| QTransform | ( | ) |
| QTransform | ( | qreal | h11, |
| qreal | h12, | ||
| qreal | h13, | ||
| qreal | h21, | ||
| qreal | h22, | ||
| qreal | h23, | ||
| qreal | h31, | ||
| qreal | h32, | ||
| qreal | h33 = 1.0 |
||
| ) |
| QTransform | ( | qreal | h11, |
| qreal | h12, | ||
| qreal | h21, | ||
| qreal | h22, | ||
| qreal | dx, | ||
| qreal | dy | ||
| ) |
| QTransform | ( | const QMatrix & | mtx | ) | [explicit] |
| bool isAffine | ( | ) | const [inline] |
Definition at line 200 of file qtransform.h.
{
return inline_type() < TxProject;
}
| bool isIdentity | ( | ) | const [inline] |
Definition at line 204 of file qtransform.h.
{
return inline_type() == TxNone;
}
| bool isInvertible | ( | ) | const [inline] |
Definition at line 209 of file qtransform.h.
{
return !qFuzzyIsNull(determinant());
}
| bool isScaling | ( | ) | const [inline] |
Definition at line 214 of file qtransform.h.
| bool isRotating | ( | ) | const [inline] |
Definition at line 218 of file qtransform.h.
{
return inline_type() >= TxRotate;
}
| bool isTranslating | ( | ) | const [inline] |
Definition at line 223 of file qtransform.h.
{
return inline_type() >= TxTranslate;
}
| TransformationType type | ( | ) | const |
| qreal determinant | ( | ) | const [inline] |
Definition at line 228 of file qtransform.h.
{
return affine._m11*(m_33*affine._m22-affine._dy*m_23) -
affine._m21*(m_33*affine._m12-affine._dy*m_13)+affine._dx*(m_23*affine._m12-affine._m22*m_13);
}
| qreal det | ( | ) | const [inline] |
| qreal m11 | ( | ) | const [inline] |
| qreal m12 | ( | ) | const [inline] |
| qreal m13 | ( | ) | const [inline] |
| qreal m21 | ( | ) | const [inline] |
| qreal m22 | ( | ) | const [inline] |
| qreal m23 | ( | ) | const [inline] |
| qreal m31 | ( | ) | const [inline] |
| qreal m32 | ( | ) | const [inline] |
| qreal m33 | ( | ) | const [inline] |
| qreal dx | ( | ) | const [inline] |
| qreal dy | ( | ) | const [inline] |
| void setMatrix | ( | qreal | m11, |
| qreal | m12, | ||
| qreal | m13, | ||
| qreal | m21, | ||
| qreal | m22, | ||
| qreal | m23, | ||
| qreal | m31, | ||
| qreal | m32, | ||
| qreal | m33 | ||
| ) |
| QTransform inverted | ( | bool * | invertible = 0 |
) | const |
| QTransform adjoint | ( | ) | const |
| QTransform transposed | ( | ) | const |
| QTransform& translate | ( | qreal | dx, |
| qreal | dy | ||
| ) |
| QTransform& scale | ( | qreal | sx, |
| qreal | sy | ||
| ) |
| QTransform& shear | ( | qreal | sh, |
| qreal | sv | ||
| ) |
| QTransform& rotate | ( | qreal | a, |
| Qt::Axis | axis =
Qt::ZAxis |
||
| ) |
| QTransform& rotateRadians | ( | qreal | a, |
| Qt::Axis | axis =
Qt::ZAxis |
||
| ) |
| static bool squareToQuad | ( | const QPolygonF & | square, |
| QTransform & | result | ||
| ) | [static] |
| static bool quadToSquare | ( | const QPolygonF & | quad, |
| QTransform & | result | ||
| ) | [static] |
| static bool quadToQuad | ( | const QPolygonF & | one, |
| const QPolygonF & | two, | ||
| QTransform & | result | ||
| ) | [static] |
| bool operator== | ( | const QTransform & | ) | const |
| bool operator!= | ( | const QTransform & | ) | const |
| QTransform& operator*= | ( | const QTransform & | ) |
| QTransform operator* | ( | const QTransform & | o | ) | const |
| QTransform& operator= | ( | const QTransform & | ) |
| operator QVariant | ( | ) | const |
| void reset | ( | ) |
| QPainterPath map | ( | const QPainterPath & | p | ) | const |
| void map | ( | int | x, |
| int | y, | ||
| int * | tx, | ||
| int * | ty | ||
| ) | const |
| void map | ( | qreal | x, |
| qreal | y, | ||
| qreal * | tx, | ||
| qreal * | ty | ||
| ) | const |
| const QMatrix& toAffine | ( | ) | const |
| QTransform & operator*= | ( | qreal | div | ) | [inline] |
Definition at line 282 of file qtransform.h.
| QTransform & operator/= | ( | qreal | div | ) | [inline] |
Definition at line 299 of file qtransform.h.
{
if (div == 0)
return *this;
div = 1/div;
return operator*=(div);
}
| QTransform & operator+= | ( | qreal | div | ) | [inline] |
Definition at line 306 of file qtransform.h.
{
if (num == 0)
return *this;
affine._m11 += num;
affine._m12 += num;
m_13 += num;
affine._m21 += num;
affine._m22 += num;
m_23 += num;
affine._dx += num;
affine._dy += num;
m_33 += num;
m_dirty = TxProject;
return *this;
}
| QTransform & operator-= | ( | qreal | div | ) | [inline] |
Definition at line 322 of file qtransform.h.
{
if (num == 0)
return *this;
affine._m11 -= num;
affine._m12 -= num;
m_13 -= num;
affine._m21 -= num;
affine._m22 -= num;
m_23 -= num;
affine._dx -= num;
affine._dy -= num;
m_33 -= num;
m_dirty = TxProject;
return *this;
}
| static QTransform fromTranslate | ( | qreal | dx, |
| qreal | dy | ||
| ) | [static] |
| static QTransform fromScale | ( | qreal | dx, |
| qreal | dy | ||
| ) | [static] |