matrix.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __CAIROMM_MATRIX_H
00019 #define __CAIROMM_MATRIX_H
00020
00021 #include <cairo.h>
00022
00023 namespace Cairo
00024 {
00025
00050 class Matrix : public cairo_matrix_t
00051 {
00052 public:
00063 Matrix();
00064
00080 Matrix(double xx, double yx, double xy, double yy, double x0, double y0);
00081
00089 void translate(double tx, double ty);
00090
00098 void scale(double sx, double sy);
00099
00109 void rotate(double radians);
00110
00116 void invert();
00117
00130 void multiply(Matrix& a, Matrix& b);
00131
00150 void transform_distance(double& dx, double& dy) const;
00151
00157 void transform_point(double& x, double& y) const;
00158 };
00159
00164 Matrix identity_matrix();
00165
00174 Matrix translation_matrix(double tx, double ty);
00175
00184 Matrix scaling_matrix(double sx, double sy);
00185
00195 Matrix rotation_matrix(double radians);
00196
00209 Matrix operator*(const Matrix& a, const Matrix& b);
00210
00211 }
00212
00213 #endif // __CAIROMM_MATRIX_H