1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/affinematrix2d.h
3 // Purpose: wxAffineMatrix2D class.
4 // Author: Based on wxTransformMatrix by Chris Breeze, Julian Smart
6 // Copyright: (c) wxWidgets team
7 // Licence: wxWidgets licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_AFFINEMATRIX2D_H_
11 #define _WX_AFFINEMATRIX2D_H_
13 #include "wx/affinematrix2dbase.h"
15 // A simple implementation of wxAffineMatrix2DBase interface done entirely in
17 class WXDLLIMPEXP_CORE wxAffineMatrix2D
: public wxAffineMatrix2DBase
20 wxAffineMatrix2D() : m_11(1), m_12(0),
26 // Implement base class pure virtual methods.
27 virtual void Set(const wxMatrix2D
& mat2D
, const wxPoint2DDouble
& tr
);
28 virtual void Get(wxMatrix2D
* mat2D
, wxPoint2DDouble
* tr
) const;
29 virtual void Concat(const wxAffineMatrix2DBase
& t
);
30 virtual bool Invert();
31 virtual bool IsIdentity() const;
32 virtual bool IsEqual(const wxAffineMatrix2DBase
& t
) const;
33 virtual void Translate(wxDouble dx
, wxDouble dy
);
34 virtual void Scale(wxDouble xScale
, wxDouble yScale
);
35 virtual void Rotate(wxDouble ccRadians
);
38 virtual wxPoint2DDouble
DoTransformPoint(const wxPoint2DDouble
& p
) const;
39 virtual wxPoint2DDouble
DoTransformDistance(const wxPoint2DDouble
& p
) const;
42 wxDouble m_11
, m_12
, m_21
, m_22
, m_tx
, m_ty
;
45 #endif // _WX_AFFINEMATRIX2D_H_