Version: 2.9.4
Public Member Functions
wxAffineMatrix2DBase Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/affinematrix2dbase.h>

Inheritance diagram for wxAffineMatrix2DBase:

Detailed Description

A 2x3 matrix representing an affine 2D transformation.

This is an abstract base class implemented by wxAffineMatrix2D only so far, but in the future we also plan to derive wxGraphicsMatrix from it.

Library:  wxCore
Category:  Miscellaneous
Since:
2.9.2

Public Member Functions

 wxAffineMatrix2DBase ()
 Default constructor.
virtual ~wxAffineMatrix2DBase ()
virtual void Set (const wxMatrix2D &mat2D, const wxPoint2DDouble &tr)=0
 Set all elements of this matrix.
virtual void Get (wxMatrix2D *mat2D, wxPoint2DDouble *tr) const =0
 Get the component values of the matrix.
virtual void Concat (const wxAffineMatrix2DBase &t)=0
 Concatenate this matrix with another one.
virtual bool Invert ()=0
 Invert this matrix.
virtual bool IsIdentity () const =0
 Check if this is the identity matrix.
bool operator!= (const wxAffineMatrix2DBase &t) const
 Check that this matrix differs from .
virtual void Translate (wxDouble dx, wxDouble dy)=0
 Add the translation to this matrix.
virtual void Scale (wxDouble xScale, wxDouble yScale)=0
 Add scaling to this matrix.
virtual void Rotate (wxDouble cRadians)=0
 Add clockwise rotation to this matrix.
void Mirror (int direction=wxHORIZONTAL)
 Add mirroring to this matrix.
wxPoint2DDouble TransformPoint (const wxPoint2DDouble &src) const
 Applies this matrix to the point.
void TransformPoint (wxDouble *x, wxDouble *y) const
wxPoint2DDouble TransformDistance (const wxPoint2DDouble &src) const
 Applies the linear part of this matrix, i.e.
void TransformDistance (wxDouble *dx, wxDouble *dy) const
virtual bool IsEqual (const wxAffineMatrix2DBase &t) const =0
 Check that this matrix is identical with .
bool operator== (const wxAffineMatrix2DBase &t) const
 Check that this matrix is identical with .

List of all members.


Constructor & Destructor Documentation

wxAffineMatrix2DBase::wxAffineMatrix2DBase ( )

Default constructor.

The matrix elements are initialize to the identity matrix.

virtual wxAffineMatrix2DBase::~wxAffineMatrix2DBase ( ) [virtual]

Member Function Documentation

virtual void wxAffineMatrix2DBase::Concat ( const wxAffineMatrix2DBase t) [pure virtual]

Concatenate this matrix with another one.

The parameter matrix is the multiplicand.

Parameters:
tThe 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 |

Implemented in wxAffineMatrix2D.

virtual void wxAffineMatrix2DBase::Get ( wxMatrix2D mat2D,
wxPoint2DDouble tr 
) const [pure virtual]

Get the component values of the matrix.

Parameters:
mat2DThe rotational components of the matrix (upper 2 x 2), must be non-NULL.
trThe translational components of the matrix, may be NULL.

Implemented in wxAffineMatrix2D.

virtual bool wxAffineMatrix2DBase::Invert ( ) [pure virtual]

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 |

Implemented in wxAffineMatrix2D.

virtual bool wxAffineMatrix2DBase::IsEqual ( const wxAffineMatrix2DBase t) const [pure virtual]

Check that this matrix is identical with .

Parameters:
tThe matrix compared with this.
virtual bool wxAffineMatrix2DBase::IsIdentity ( ) const [pure virtual]

Check if this is the identity matrix.

Implemented in wxAffineMatrix2D.

void wxAffineMatrix2DBase::Mirror ( int  direction = wxHORIZONTAL)

Add mirroring to this matrix.

Parameters:
directionThe direction(s) used for mirroring. One of wxHORIZONTAL, wxVERTICAL or their combination wxBOTH.

Reimplemented in wxAffineMatrix2D.

bool wxAffineMatrix2DBase::operator!= ( const wxAffineMatrix2DBase t) const

Check that this matrix differs from .

Parameters:
tThe matrix compared with this.

Reimplemented in wxAffineMatrix2D.

bool wxAffineMatrix2DBase::operator== ( const wxAffineMatrix2DBase t) const

Check that this matrix is identical with .

Parameters:
tThe matrix compared with this.

Reimplemented in wxAffineMatrix2D.

virtual void wxAffineMatrix2DBase::Rotate ( wxDouble  cRadians) [pure virtual]

Add clockwise rotation to this matrix.

Parameters:
cRadiansRotation angle in radians, clockwise.

Implemented in wxAffineMatrix2D.

virtual void wxAffineMatrix2DBase::Scale ( wxDouble  xScale,
wxDouble  yScale 
) [pure virtual]

Add scaling to this matrix.

Parameters:
xScaleScaling in x direction.
yScaleScaling in y direction.

Implemented in wxAffineMatrix2D.

virtual void wxAffineMatrix2DBase::Set ( const wxMatrix2D mat2D,
const wxPoint2DDouble tr 
) [pure virtual]

Set all elements of this matrix.

Parameters:
mat2DThe rotational components of the matrix (upper 2 x 2).
trThe translational components of the matrix.

Implemented in wxAffineMatrix2D.

void wxAffineMatrix2DBase::TransformDistance ( wxDouble dx,
wxDouble dy 
) const

Reimplemented in wxAffineMatrix2D.

wxPoint2DDouble wxAffineMatrix2DBase::TransformDistance ( const wxPoint2DDouble src) const

Applies the linear part of this matrix, i.e.

without translation.

Parameters:
pThe source receiving the transformations.
Returns:
The source with the transformations applied.

Reimplemented in wxAffineMatrix2D.

wxPoint2DDouble wxAffineMatrix2DBase::TransformPoint ( const wxPoint2DDouble src) const

Applies this matrix to the point.

Parameters:
pThe point receiving the transformations.
Returns:
The point with the transformations applied.

Reimplemented in wxAffineMatrix2D.

void wxAffineMatrix2DBase::TransformPoint ( wxDouble x,
wxDouble y 
) const

Reimplemented in wxAffineMatrix2D.

virtual void wxAffineMatrix2DBase::Translate ( wxDouble  dx,
wxDouble  dy 
) [pure virtual]

Add the translation to this matrix.

Parameters:
dxThe translation in x direction.
dyThe translation in y direction.

Implemented in wxAffineMatrix2D.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines