00001
00002
00003
00004
00005
00006 #ifndef H_CPPCommonMatrix2D
00007 #define H_CPPCommonMatrix2D
00008
00009 #include <Common/Common.h>
00010 #include <C/Common/TRN_Types.h>
00011 #include <C/Common/TRN_Matrix2D.h>
00012
00013
00014 namespace pdftron {
00015 namespace Common {
00016
00017
00102 class Matrix2D : public TRN_Matrix2D
00103 {
00104 public:
00105
00119 Matrix2D(double a = 1, double b = 0, double c = 0, double d = 1, double h = 0, double v = 0);
00120
00124 Matrix2D(const Matrix2D& m);
00125
00129 Matrix2D& operator= (const Matrix2D& m);
00130
00141 void Set (double a, double b, double c, double d, double h, double v);
00142
00154 void Concat(double a, double b, double c, double d, double h, double v);
00155
00162 Matrix2D& operator*= (const Matrix2D& m);
00163
00169 Matrix2D operator* (const Matrix2D& m) const;
00170
00177 bool operator== (const Matrix2D& m) const;
00178
00185 bool operator!= (const Matrix2D& m) const {return !(this->operator ==(m));}
00186
00190 void Mult(double& in_out_x, double& in_out_y) const;
00191
00195 Matrix2D Inverse () const;
00196
00206 Matrix2D& Translate (double h, double v);
00207
00216 Matrix2D& Scale (double h, double v);
00217
00221 static Matrix2D ZeroMatrix ();
00222
00226 static Matrix2D IdentityMatrix ();
00227
00233 static Matrix2D RotationMatrix (const double angle);
00234 };
00235
00236
00237 #include <Impl/Matrix2D.inl>
00238
00239 };
00240 };
00241
00242 #endif // H_CPPCommonMatrix2D
00243
00244