#include <wx/affinematrix2d.h>
Public Member Functions | |
wxAffineMatrix2D () | |
Default constructor. | |
void | Get (wxMatrix2D *mat2D, wxPoint2DDouble *tr) const |
Get the component values of the matrix. | |
void | Set (const wxMatrix2D &mat2D, const wxPoint2DDouble &tr) |
Set all elements of this matrix. | |
void | Concat (const wxAffineMatrix2DBase &t) |
Concatenate this matrix with another one. | |
bool | Invert () |
Invert this matrix. | |
bool | IsIdentity () const |
Check if this is the identity matrix. | |
bool | operator!= (const wxAffineMatrix2DBase &t) const |
Check that this matrix differs from . | |
void | Translate (wxDouble dx, wxDouble dy) |
Add the translation to this matrix. | |
void | Scale (wxDouble xScale, wxDouble yScale) |
Add scaling to this matrix. | |
void | Mirror (int direction=wxHORIZONTAL) |
Add mirroring to this matrix. | |
void | Rotate (wxDouble ccRadians) |
Add counter clockwise rotation to this matrix. | |
wxPoint2DDouble | TransformPoint (const wxPoint2DDouble &p) const |
Applies this matrix to the point. | |
void | TransformPoint (wxDouble *x, wxDouble *y) const |
wxPoint2DDouble | TransformDistance (const wxPoint2DDouble &p) const |
Applies the linear part of this matrix, i.e. | |
void | TransformDistance (wxDouble *dx, wxDouble *dy) const |
void | IsEqual (const wxAffineMatrix2DBase &t) |
Check that this matrix is identical with . | |
bool | operator== (const wxAffineMatrix2DBase &t) const |
Check that this matrix is identical with . |
wxAffineMatrix2D::wxAffineMatrix2D | ( | ) |
Default constructor.
The matrix elements are initialize to the identity matrix.
void wxAffineMatrix2D::Concat | ( | const wxAffineMatrix2DBase & | t | ) |
Concatenate this matrix with another one.
The parameter matrix is the multiplicand.
t | The multiplicand. |
// | t.m_11 t.m_12 0 | | m_11 m_12 0 | // matrix' = | t.m_21 t.m_22 0 | x | m_21 m_22 0 | // | t.m_tx t.m_ty 1 | | m_tx m_ty 1 |
void wxAffineMatrix2D::Get | ( | wxMatrix2D * | mat2D, | |
wxPoint2DDouble * | tr | |||
) | const |
Get the component values of the matrix.
mat2D | The rotational components of the matrix (upper 2 x 2), must be non-NULL. | |
tr | The translational components of the matrix, may be NULL. |
bool wxAffineMatrix2D::Invert | ( | ) |
Invert this matrix.
If the matrix is not invertible, i.e. if its determinant is 0, returns false and doesn't modify it.
// | m_11 m_12 0 | // Invert | m_21 m_22 0 | // | m_tx m_ty 1 |
void wxAffineMatrix2D::IsEqual | ( | const wxAffineMatrix2DBase & | t | ) |
Check that this matrix is identical with .
t | The matrix compared with this. |
bool wxAffineMatrix2D::IsIdentity | ( | ) | const |
Check if this is the identity matrix.
void wxAffineMatrix2D::Mirror | ( | int | direction = wxHORIZONTAL |
) |
Add mirroring to this matrix.
direction | The direction(s) used for mirroring. One of wxHORIZONTAL, wxVERTICAL or their combination wxBOTH. |
bool wxAffineMatrix2D::operator!= | ( | const wxAffineMatrix2DBase & | t | ) | const |
Check that this matrix differs from .
t | The matrix compared with this. |
bool wxAffineMatrix2D::operator== | ( | const wxAffineMatrix2DBase & | t | ) | const |
Check that this matrix is identical with .
t | The matrix compared with this. |
void wxAffineMatrix2D::Rotate | ( | wxDouble | ccRadians | ) |
Add counter clockwise rotation to this matrix.
ccRadians | Rotation angle in radians. |
Add scaling to this matrix.
xScale | Scaling in x direction. | |
yScale | Scaling in y direction. |
void wxAffineMatrix2D::Set | ( | const wxMatrix2D & | mat2D, | |
const wxPoint2DDouble & | tr | |||
) |
Set all elements of this matrix.
mat2D | The rotational components of the matrix (upper 2 x 2). | |
tr | The translational components of the matrix. |
wxPoint2DDouble wxAffineMatrix2D::TransformDistance | ( | const wxPoint2DDouble & | p | ) | const |
Applies the linear part of this matrix, i.e.
without translation.
p | The source receiving the transformations. |
wxPoint2DDouble wxAffineMatrix2D::TransformPoint | ( | const wxPoint2DDouble & | p | ) | const |
Applies this matrix to the point.
p | The point receiving the transformations. |
Add the translation to this matrix.
dx | The translation in x direction. | |
dy | The translation in y direction. |
![]() |
[ top ] |