]> git.saurik.com Git - wxWidgets.git/blame - include/wx/affinematrix2d.h
Implement SelectAll for OSX WebKit.
[wxWidgets.git] / include / wx / affinematrix2d.h
CommitLineData
0e5d4c38
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/affinematrix2d.h
3// Purpose: wxAffineMatrix2D class.
4// Author: Based on wxTransformMatrix by Chris Breeze, Julian Smart
5// Created: 2011-04-05
6// Copyright: (c) wxWidgets team
7// Licence: wxWidgets licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_AFFINEMATRIX2D_H_
11#define _WX_AFFINEMATRIX2D_H_
12
13#include "wx/affinematrix2dbase.h"
14
15// A simple implementation of wxAffineMatrix2DBase interface done entirely in
16// wxWidgets.
17class WXDLLIMPEXP_CORE wxAffineMatrix2D : public wxAffineMatrix2DBase
18{
19public:
20 wxAffineMatrix2D() : m_11(1), m_12(0),
21 m_21(0), m_22(1),
22 m_tx(0), m_ty(0)
23 {
24 }
25
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);
36
37protected:
38 virtual wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const;
39 virtual wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const;
40
41private:
42 wxDouble m_11, m_12, m_21, m_22, m_tx, m_ty;
43};
44
45#endif // _WX_AFFINEMATRIX2D_H_