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: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_AFFINEMATRIX2D_H_
11 #define _WX_AFFINEMATRIX2D_H_
17 #include "wx/affinematrix2dbase.h"
19 // A simple implementation of wxAffineMatrix2DBase interface done entirely in
21 class WXDLLIMPEXP_CORE wxAffineMatrix2D
: public wxAffineMatrix2DBase
24 wxAffineMatrix2D() : m_11(1), m_12(0),
30 // Implement base class pure virtual methods.
31 virtual void Set(const wxMatrix2D
& mat2D
, const wxPoint2DDouble
& tr
);
32 virtual void Get(wxMatrix2D
* mat2D
, wxPoint2DDouble
* tr
) const;
33 virtual void Concat(const wxAffineMatrix2DBase
& t
);
34 virtual bool Invert();
35 virtual bool IsIdentity() const;
36 virtual bool IsEqual(const wxAffineMatrix2DBase
& t
) const;
37 virtual void Translate(wxDouble dx
, wxDouble dy
);
38 virtual void Scale(wxDouble xScale
, wxDouble yScale
);
39 virtual void Rotate(wxDouble cRadians
);
42 virtual wxPoint2DDouble
DoTransformPoint(const wxPoint2DDouble
& p
) const;
43 virtual wxPoint2DDouble
DoTransformDistance(const wxPoint2DDouble
& p
) const;
46 wxDouble m_11
, m_12
, m_21
, m_22
, m_tx
, m_ty
;
49 #endif // wxUSE_GEOMETRY
51 #endif // _WX_AFFINEMATRIX2D_H_