ReactOS  0.4.14-dev-323-g6fe6a88
gdiplusmatrix.h
Go to the documentation of this file.
1 /*
2  * GdiPlusMatrix.h
3  *
4  * Windows GDI+
5  *
6  * This file is part of the w32api package.
7  *
8  * THIS SOFTWARE IS NOT COPYRIGHTED
9  *
10  * This source code is offered for use in the public domain. You may
11  * use, modify or distribute it freely.
12  *
13  * This code is distributed in the hope that it will be useful but
14  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
15  * DISCLAIMED. This includes but is not limited to warranties of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  */
18 
19 #ifndef _GDIPLUSMATRIX_H
20 #define _GDIPLUSMATRIX_H
21 
22 class Matrix : public GdiplusBase
23 {
24  friend class Pen;
25  friend class Region;
26 
27 public:
28  Matrix(const RectF &rect, const PointF *dstplg)
29  {
31  }
32 
33  Matrix(const Rect &rect, const Point *dstplg)
34  {
36  }
37 
39  {
41  }
42 
44  {
46  }
47 
49  {
50  Matrix *cloneMatrix = new Matrix(); // FIXME: Matrix::matrix already initialized --> potential memory leak
51  cloneMatrix->status = DllExports::GdipCloneMatrix(matrix, cloneMatrix ? &cloneMatrix->matrix : NULL);
52  return cloneMatrix;
53  }
54 
56  {
58  }
59 
61  {
62  BOOL result;
64  return result;
65  }
66 
68  {
70  }
71 
73  {
74  return status;
75  }
76 
78  {
80  }
81 
83  {
84  BOOL result;
86  return result;
87  }
88 
90  {
91  BOOL result;
93  return result;
94  }
95 
97  {
99  }
100 
102  {
103  return 0;
104  }
105 
107  {
108  return 0;
109  }
110 
112  {
113  return NotImplemented;
114  }
115 
117  {
119  }
120 
122  {
123  return NotImplemented;
124  }
125 
127  {
128  return SetStatus(DllExports::GdipScaleMatrix(matrix, scaleX, scaleY, order));
129  }
130 
132  {
134  }
135 
137  {
138  return SetStatus(DllExports::GdipShearMatrix(matrix, shearX, shearY, order));
139  }
140 
142  {
144  }
145 
147  {
149  }
150 
152  {
154  }
155 
157  {
159  }
160 
162  {
163  return SetStatus(DllExports::GdipTranslateMatrix(matrix, offsetX, offsetY, order));
164  }
165 
166 private:
167  mutable Status status;
169 
171  {
172  if (status == Ok)
173  return status;
174  this->status = status;
175  return status;
176  }
177 };
178 
179 #endif /* _GDIPLUSMATRIX_H */
REAL OffsetY(VOID)
GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count)
Definition: matrix.c:467
Status GetElements(REAL *m) const
Definition: gdiplusmatrix.h:67
GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
Definition: matrix.c:316
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count)
Definition: matrix.c:445
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy, GpMatrix **matrix)
Definition: matrix.c:61
BOOL Equals(const Matrix *matrix)
Definition: gdiplusmatrix.h:60
GLuint GLenum matrix
Definition: glext.h:9407
Status Rotate(REAL angle, MatrixOrder order)
GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix *matrix, REAL *out)
Definition: matrix.c:172
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint dy
Definition: linetemp.h:97
GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint *pt, GpMatrix **matrix)
Definition: matrix.c:104
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
Definition: matrix.c:140
GpMatrix * matrix
Status TransformPoints(Point *pts, INT count)
GLfloat angle
Definition: glext.h:10853
Matrix * Clone(VOID)
Definition: gdiplusmatrix.h:48
Status TransformPoints(PointF *pts, INT count)
Status SetStatus(Status status) const
int32_t INT
Definition: typedefs.h:56
& rect
Definition: startmenu.cpp:1413
Status Multiply(const Matrix *matrix, MatrixOrder order)
Definition: gdiplusmatrix.h:96
GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *rect, GDIPCONST GpPointF *pt, GpMatrix **matrix)
Definition: matrix.c:85
const GLfloat * m
Definition: glext.h:10848
GpStatus WINGDIPAPI GdipIsMatrixInvertible(GDIPCONST GpMatrix *matrix, BOOL *result)
Definition: matrix.c:225
GpStatus WINGDIPAPI GdipIsMatrixEqual(GDIPCONST GpMatrix *matrix, GDIPCONST GpMatrix *matrix2, BOOL *result)
Definition: matrix.c:499
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix *matrix, GpMatrix **clone)
Definition: matrix.c:125
Status SetElements(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
Status RotateAt(REAL angle, const PointF &center, MatrixOrder order)
MatrixOrder
Definition: gdiplusenums.h:185
BOOL IsInvertible(VOID)
Definition: gdiplusmatrix.h:89
#define m11
GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count)
Definition: matrix.c:386
#define m21
Status Translate(REAL offsetX, REAL offsetY, MatrixOrder order)
Status TransformVectors(PointF *pts, INT count)
Status Reset(VOID)
Status Scale(REAL scaleX, REAL scaleY, MatrixOrder order)
Matrix(VOID)
Definition: gdiplusmatrix.h:38
#define m22
Status status
~Matrix(VOID)
Definition: gdiplusmatrix.h:55
GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix *matrix, REAL angle, GpMatrixOrder order)
Definition: matrix.c:258
Status Invert(VOID)
Definition: gdiplusmatrix.h:77
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
Definition: matrix.c:160
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order)
Definition: matrix.c:289
GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count)
Definition: matrix.c:363
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipShearMatrix(GpMatrix *matrix, REAL shearX, REAL shearY, GpMatrixOrder order)
Definition: matrix.c:335
GpStatus WINGDIPAPI GdipInvertMatrix(GpMatrix *matrix)
Definition: matrix.c:185
GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY, GpMatrixOrder order)
Definition: matrix.c:418
Matrix(const Rect &rect, const Point *dstplg)
Definition: gdiplusmatrix.h:33
REAL OffsetX(VOID)
#define m12
GLint dx
Definition: linetemp.h:97
Status TransformVectors(Point *pts, INT count)
Matrix(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
Definition: gdiplusmatrix.h:43
Status GetLastStatus(VOID)
Definition: gdiplusmatrix.h:72
float REAL
Definition: types.h:41
GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix *matrix, BOOL *result)
Definition: matrix.c:512
Definition: gdipluspen.h:24
GLuint64EXT * result
Definition: glext.h:11304
Status Shear(REAL shearX, REAL shearY, MatrixOrder order)
Matrix(const RectF &rect, const PointF *dstplg)
Definition: gdiplusmatrix.h:28
BOOL IsIdentity(VOID)
Definition: gdiplusmatrix.h:82
Definition: ps.c:97
GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix *matrix, GDIPCONST GpMatrix *matrix2, GpMatrixOrder order)
Definition: matrix.c:240