1 ////////////////////////////////////////////////////////////////////////////// 2 // Name: SVGTransform.h 3 // Author: Alex Thuering 4 // Copyright: (c) 2005 Alex Thuering 5 // Licence: wxWindows licence 6 // Notes: generated by generate.py 7 ////////////////////////////////////////////////////////////////////////////// 8 9 #ifndef WX_SVG_TRANSFORM_H 10 #define WX_SVG_TRANSFORM_H 11 12 #include "SVGMatrix.h" 13 #include "String_wxsvg.h" 14 15 16 enum wxSVG_TRANSFORM 17 { 18 wxSVG_TRANSFORM_UNKNOWN = 0, 19 wxSVG_TRANSFORM_MATRIX = 1, 20 wxSVG_TRANSFORM_TRANSLATE = 2, 21 wxSVG_TRANSFORM_SCALE = 3, 22 wxSVG_TRANSFORM_ROTATE = 4, 23 wxSVG_TRANSFORM_SKEWX = 5, 24 wxSVG_TRANSFORM_SKEWY = 6 25 }; 26 27 class wxSVGTransform 28 { 29 protected: 30 wxSVG_TRANSFORM m_type; 31 wxSVGMatrix m_matrix; 32 double m_angle; 33 double m_cx; 34 double m_cy; 35 36 public: GetType()37 inline wxSVG_TRANSFORM GetType() const { return m_type; } SetType(const wxSVG_TRANSFORM & n)38 inline void SetType(const wxSVG_TRANSFORM& n) { m_type = n; } 39 GetMatrix()40 inline const wxSVGMatrix& GetMatrix() const { return m_matrix; } GetAngle()41 inline double GetAngle() const { return m_angle; } SetAngle(double n)42 inline void SetAngle(double n) { m_angle = n; } 43 44 public: wxSVGTransform()45 wxSVGTransform(): m_type(wxSVG_TRANSFORM(0)), m_angle(0), m_cx(0), m_cy(0) {} wxSVGTransform(const wxSVGMatrix & matrix)46 wxSVGTransform(const wxSVGMatrix& matrix): m_type(wxSVG_TRANSFORM_MATRIX), m_matrix(matrix), m_angle(0), m_cx(0), m_cy(0) {} ~wxSVGTransform()47 virtual ~wxSVGTransform() {} 48 49 wxString GetValueAsString() const; 50 void SetValueAsString(const wxString& value); 51 SetMatrix(const wxSVGMatrix & n)52 inline void SetMatrix(const wxSVGMatrix& n) { m_type = wxSVG_TRANSFORM_MATRIX; m_matrix = n; } 53 virtual void SetTranslate(double tx, double ty); 54 virtual void SetScale(double sx, double sy); 55 virtual void SetRotate(double angle, double cx, double cy); 56 virtual void SetSkewX(double angle); 57 virtual void SetSkewY(double angle); 58 }; 59 60 #endif // WX_SVG_TRANSFORM_H 61