QMatrix Class Reference

QMatrix Class Reference

#include <qmatrix.h>

Class Description

Definition at line 61 of file qmatrix.h.

Public Member Functions

 QMatrix (Qt::Initialization)
 
 QMatrix ()
 
 QMatrix (qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy)
 
 QMatrix (const QMatrix &matrix)
 
void setMatrix (qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy)
 
qreal m11 () const
 
qreal m12 () const
 
qreal m21 () const
 
qreal m22 () const
 
qreal dx () const
 
qreal dy () const
 
void map (int x, int y, int *tx, int *ty) const
 
void map (qreal x, qreal y, qreal *tx, qreal *ty) const
 
QRect mapRect (const QRect &) const
 
QRectF mapRect (const QRectF &) const
 
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
 
void reset ()
 
bool isIdentity () const
 
QMatrixtranslate (qreal dx, qreal dy)
 
QMatrixscale (qreal sx, qreal sy)
 
QMatrixshear (qreal sh, qreal sv)
 
QMatrixrotate (qreal a)
 
bool isInvertible () const
 
qreal determinant () const
 
QMatrix inverted (bool *invertible=0) const
 
bool operator== (const QMatrix &) const
 
bool operator!= (const QMatrix &) const
 
QMatrixoperator*= (const QMatrix &)
 
QMatrix operator* (const QMatrix &o) const
 
QMatrixoperator= (const QMatrix &)
 
 operator QVariant () const
 

Friends

class QTransform
 

Constructor & Destructor Documentation

QMatrix ( Qt::Initialization  )
inlineexplicit

Definition at line 64 of file qmatrix.h.

64 {}
QMatrix ( )
QMatrix ( qreal  m11,
qreal  m12,
qreal  m21,
qreal  m22,
qreal  dx,
qreal  dy 
)
QMatrix ( const QMatrix matrix)

Member Function Documentation

void setMatrix ( qreal  m11,
qreal  m12,
qreal  m21,
qreal  m22,
qreal  dx,
qreal  dy 
)
qreal m11 ( ) const
inline

Definition at line 73 of file qmatrix.h.

73 { return _m11; }
qreal m12 ( ) const
inline

Definition at line 74 of file qmatrix.h.

74 { return _m12; }
qreal m21 ( ) const
inline

Definition at line 75 of file qmatrix.h.

75 { return _m21; }
qreal m22 ( ) const
inline

Definition at line 76 of file qmatrix.h.

76 { return _m22; }
qreal dx ( ) const
inline

Definition at line 77 of file qmatrix.h.

77 { return _dx; }
qreal dy ( ) const
inline

Definition at line 78 of file qmatrix.h.

78 { return _dy; }
void map ( int  x,
int  y,
int tx,
int ty 
) const
void map ( qreal  x,
qreal  y,
qreal *  tx,
qreal *  ty 
) const
QRect mapRect ( const QRect ) const
QRectF mapRect ( const QRectF ) const
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
void reset ( )
bool isIdentity ( ) const
inline

Definition at line 166 of file qmatrix.h.

167 {
168  return qFuzzyIsNull(_m11 - 1) && qFuzzyIsNull(_m22 - 1) && qFuzzyIsNull(_m12)
169  && qFuzzyIsNull(_m21) && qFuzzyIsNull(_dx) && qFuzzyIsNull(_dy);
170 }
QMatrix& translate ( qreal  dx,
qreal  dy 
)
QMatrix& scale ( qreal  sx,
qreal  sy 
)
QMatrix& shear ( qreal  sh,
qreal  sv 
)
QMatrix& rotate ( qreal  a)
bool isInvertible ( ) const
inline

Definition at line 103 of file qmatrix.h.

103 { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); }
qreal determinant ( ) const
inline

Definition at line 104 of file qmatrix.h.

104 { return _m11*_m22 - _m12*_m21; }
QMatrix inverted ( bool *  invertible = 0) const
bool operator== ( const QMatrix ) const
bool operator!= ( const QMatrix ) const
QMatrix& operator*= ( const QMatrix )
QMatrix operator* ( const QMatrix o) const
QMatrix& operator= ( const QMatrix )
operator QVariant ( ) const

Friends And Related Function Documentation

friend class QTransform
friend

Definition at line 142 of file qmatrix.h.


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