ReactOS  0.4.15-dev-309-g7c8d563
Matrix Class Reference

#include <gdiplusmatrix.h>

Inheritance diagram for Matrix:
Collaboration diagram for Matrix:

Public Member Functions

 Matrix (const RectF &rect, const PointF *dstplg)
 
 Matrix (const Rect &rect, const Point *dstplg)
 
 Matrix ()
 
 Matrix (REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
 
MatrixClone () const
 
 ~Matrix ()
 
BOOL Equals (const Matrix *matrix) const
 
Status GetElements (REAL *m) const
 
Status GetLastStatus () const
 
Status Invert ()
 
BOOL IsIdentity () const
 
BOOL IsInvertible () const
 
Status Multiply (const Matrix *matrix, MatrixOrder order=MatrixOrderPrepend)
 
REAL OffsetX () const
 
REAL OffsetY () const
 
Status Reset ()
 
Status Rotate (REAL angle, MatrixOrder order=MatrixOrderPrepend)
 
Status RotateAt (REAL angle, const PointF &center, MatrixOrder order=MatrixOrderPrepend)
 
Status Scale (REAL scaleX, REAL scaleY, MatrixOrder order=MatrixOrderPrepend)
 
Status SetElements (REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
 
Status Shear (REAL shearX, REAL shearY, MatrixOrder order=MatrixOrderPrepend)
 
Status TransformPoints (Point *pts, INT count)
 
Status TransformPoints (PointF *pts, INT count)
 
Status TransformVectors (Point *pts, INT count)
 
Status TransformVectors (PointF *pts, INT count)
 
Status Translate (REAL offsetX, REAL offsetY, MatrixOrder order=MatrixOrderPrepend)
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Protected Member Functions

 Matrix (GpMatrix *matrix)
 
Status SetStatus (Status status) const
 

Protected Attributes

GpMatrixnativeMatrix
 
Status lastStatus
 

Friends

class Pen
 
class Region
 
class GraphicsPath
 
class Brush
 
class LinearGradientBrush
 
class TextureBrush
 
GpMatrix *& getNat (const Matrix *matrix)
 

Detailed Description

Definition at line 22 of file gdiplusmatrix.h.

Constructor & Destructor Documentation

◆ Matrix() [1/5]

Matrix::Matrix ( const RectF rect,
const PointF dstplg 
)
inline

Definition at line 32 of file gdiplusmatrix.h.

33  {
35  }
Status lastStatus
& rect
Definition: startmenu.cpp:1413
GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *rect, GDIPCONST GpPointF *pt, GpMatrix **matrix)
Definition: matrix.c:85
GpMatrix * nativeMatrix

◆ Matrix() [2/5]

Matrix::Matrix ( const Rect rect,
const Point dstplg 
)
inline

Definition at line 37 of file gdiplusmatrix.h.

38  {
40  }
GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint *pt, GpMatrix **matrix)
Definition: matrix.c:104
Status lastStatus
& rect
Definition: startmenu.cpp:1413
GpMatrix * nativeMatrix

◆ Matrix() [3/5]

Matrix::Matrix ( )
inline

Definition at line 42 of file gdiplusmatrix.h.

43  {
45  }
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
Definition: matrix.c:140
Status lastStatus
GpMatrix * nativeMatrix

Referenced by Clone().

◆ Matrix() [4/5]

Matrix::Matrix ( REAL  m11,
REAL  m12,
REAL  m21,
REAL  m22,
REAL  dx,
REAL  dy 
)
inline

Definition at line 47 of file gdiplusmatrix.h.

48  {
50  }
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy, GpMatrix **matrix)
Definition: matrix.c:61
GLint dy
Definition: linetemp.h:97
Status lastStatus
#define m11
#define m21
GpMatrix * nativeMatrix
#define m22
#define m12
GLint dx
Definition: linetemp.h:97

◆ ~Matrix()

Matrix::~Matrix ( )
inline

Definition at line 68 of file gdiplusmatrix.h.

69  {
71  }
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
Definition: matrix.c:160

◆ Matrix() [5/5]

Matrix::Matrix ( GpMatrix matrix)
inlineprotected

Definition at line 220 of file gdiplusmatrix.h.

221  {
222  }
GLuint GLenum matrix
Definition: glext.h:9407
Status lastStatus
GpMatrix * nativeMatrix

Member Function Documentation

◆ Clone()

Matrix* Matrix::Clone ( ) const
inline

Definition at line 53 of file gdiplusmatrix.h.

54  {
55  GpMatrix *cloneMatrix = NULL;
57 
58  if (lastStatus != Ok)
59  return NULL;
60 
61  Matrix *newMatrix = new Matrix(cloneMatrix);
62  if (!newMatrix)
63  DllExports::GdipDeleteMatrix(cloneMatrix);
64 
65  return newMatrix;
66  }
Status lastStatus
Status SetStatus(Status status) const
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix *matrix, GpMatrix **clone)
Definition: matrix.c:125
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
Definition: matrix.c:160

◆ Equals()

BOOL Matrix::Equals ( const Matrix matrix) const
inline

Definition at line 74 of file gdiplusmatrix.h.

75  {
76  BOOL result;
78  return result;
79  }
GLuint GLenum matrix
Definition: glext.h:9407
Status SetStatus(Status status) const
friend GpMatrix *& getNat(const Matrix *matrix)
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
GpMatrix * nativeMatrix
GLuint64EXT * result
Definition: glext.h:11304

◆ GetElements()

Status Matrix::GetElements ( REAL m) const
inline

Definition at line 82 of file gdiplusmatrix.h.

83  {
85  }
GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix *matrix, REAL *out)
Definition: matrix.c:172
Status SetStatus(Status status) const
const GLfloat * m
Definition: glext.h:10848
GpMatrix * nativeMatrix

Referenced by OffsetX(), and OffsetY().

◆ GetLastStatus()

Status Matrix::GetLastStatus ( ) const
inline

Definition at line 88 of file gdiplusmatrix.h.

89  {
90  return lastStatus;
91  }
Status lastStatus

◆ Invert()

Status Matrix::Invert ( )
inline

Definition at line 94 of file gdiplusmatrix.h.

95  {
97  }
Status SetStatus(Status status) const
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipInvertMatrix(GpMatrix *matrix)
Definition: matrix.c:185

◆ IsIdentity()

BOOL Matrix::IsIdentity ( ) const
inline

Definition at line 100 of file gdiplusmatrix.h.

101  {
102  BOOL result;
104  return result;
105  }
Status SetStatus(Status status) const
unsigned int BOOL
Definition: ntddk_ex.h:94
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix *matrix, BOOL *result)
Definition: matrix.c:512
GLuint64EXT * result
Definition: glext.h:11304

◆ IsInvertible()

BOOL Matrix::IsInvertible ( ) const
inline

Definition at line 108 of file gdiplusmatrix.h.

109  {
110  BOOL result;
112  return result;
113  }
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipIsMatrixInvertible(GDIPCONST GpMatrix *matrix, BOOL *result)
Definition: matrix.c:225
unsigned int BOOL
Definition: ntddk_ex.h:94
GpMatrix * nativeMatrix
GLuint64EXT * result
Definition: glext.h:11304

◆ Multiply()

Status Matrix::Multiply ( const Matrix matrix,
MatrixOrder  order = MatrixOrderPrepend 
)
inline

Definition at line 116 of file gdiplusmatrix.h.

117  {
119  }
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLuint GLenum matrix
Definition: glext.h:9407
Status SetStatus(Status status) const
friend GpMatrix *& getNat(const Matrix *matrix)
smooth NULL
Definition: ftsmooth.c:416
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix *matrix, GDIPCONST GpMatrix *matrix2, GpMatrixOrder order)
Definition: matrix.c:240

◆ OffsetX()

REAL Matrix::OffsetX ( ) const
inline

Definition at line 122 of file gdiplusmatrix.h.

123  {
124  REAL elements[6];
125  if (GetElements(elements) == Ok)
126  return elements[4];
127  return 0.0f;
128  }
Status GetElements(REAL *m) const
Definition: gdiplusmatrix.h:82
float REAL
Definition: types.h:41

◆ OffsetY()

REAL Matrix::OffsetY ( ) const
inline

Definition at line 131 of file gdiplusmatrix.h.

132  {
133  REAL elements[6];
134  if (GetElements(elements) == Ok)
135  return elements[5];
136  return 0.0f;
137  }
Status GetElements(REAL *m) const
Definition: gdiplusmatrix.h:82
float REAL
Definition: types.h:41

◆ Reset()

Status Matrix::Reset ( void  )
inline

Definition at line 140 of file gdiplusmatrix.h.

141  {
142  return SetStatus(DllExports::GdipSetMatrixElements(nativeMatrix, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0));
143  }
GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
Definition: matrix.c:316
Status SetStatus(Status status) const
GpMatrix * nativeMatrix

◆ Rotate()

Status Matrix::Rotate ( REAL  angle,
MatrixOrder  order = MatrixOrderPrepend 
)
inline

Definition at line 146 of file gdiplusmatrix.h.

147  {
149  }
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLfloat angle
Definition: glext.h:10853
Status SetStatus(Status status) const
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix *matrix, REAL angle, GpMatrixOrder order)
Definition: matrix.c:258

◆ RotateAt()

Status Matrix::RotateAt ( REAL  angle,
const PointF center,
MatrixOrder  order = MatrixOrderPrepend 
)
inline

Definition at line 152 of file gdiplusmatrix.h.

153  {
154  if (order == MatrixOrderPrepend)
155  {
158  return SetStatus(DllExports::GdipTranslateMatrix(nativeMatrix, -center.X, -center.Y, order));
159  }
160  else
161  {
165  }
166  }
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLfloat angle
Definition: glext.h:10853
Status SetStatus(Status status) const
GpMatrix * nativeMatrix
REAL Y
Definition: gdiplustypes.h:649
GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix *matrix, REAL angle, GpMatrixOrder order)
Definition: matrix.c:258
REAL X
Definition: gdiplustypes.h:648
GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY, GpMatrixOrder order)
Definition: matrix.c:418

◆ Scale()

Status Matrix::Scale ( REAL  scaleX,
REAL  scaleY,
MatrixOrder  order = MatrixOrderPrepend 
)
inline

Definition at line 169 of file gdiplusmatrix.h.

170  {
171  return SetStatus(DllExports::GdipScaleMatrix(nativeMatrix, scaleX, scaleY, order));
172  }
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
Status SetStatus(Status status) const
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order)
Definition: matrix.c:289

◆ SetElements()

Status Matrix::SetElements ( REAL  m11,
REAL  m12,
REAL  m21,
REAL  m22,
REAL  dx,
REAL  dy 
)
inline

Definition at line 175 of file gdiplusmatrix.h.

176  {
178  }
GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
Definition: matrix.c:316
GLint dy
Definition: linetemp.h:97
Status SetStatus(Status status) const
#define m11
#define m21
GpMatrix * nativeMatrix
#define m22
#define m12
GLint dx
Definition: linetemp.h:97

◆ SetStatus()

Status Matrix::SetStatus ( Status  status) const
inlineprotected

Definition at line 225 of file gdiplusmatrix.h.

226  {
227  if (status != Ok)
228  lastStatus = status;
229  return status;
230  }
Status lastStatus
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by Clone(), Equals(), GetElements(), Invert(), IsIdentity(), IsInvertible(), Multiply(), Reset(), Rotate(), RotateAt(), Scale(), SetElements(), Shear(), TransformPoints(), TransformVectors(), and Translate().

◆ Shear()

Status Matrix::Shear ( REAL  shearX,
REAL  shearY,
MatrixOrder  order = MatrixOrderPrepend 
)
inline

Definition at line 181 of file gdiplusmatrix.h.

182  {
183  return SetStatus(DllExports::GdipShearMatrix(nativeMatrix, shearX, shearY, order));
184  }
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
Status SetStatus(Status status) const
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipShearMatrix(GpMatrix *matrix, REAL shearX, REAL shearY, GpMatrixOrder order)
Definition: matrix.c:335

◆ TransformPoints() [1/2]

Status Matrix::TransformPoints ( Point pts,
INT  count 
)
inline

Definition at line 187 of file gdiplusmatrix.h.

188  {
190  }
GLuint GLuint GLsizei count
Definition: gl.h:1545
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count)
Definition: matrix.c:386
GpMatrix * nativeMatrix

◆ TransformPoints() [2/2]

Status Matrix::TransformPoints ( PointF pts,
INT  count 
)
inline

Definition at line 193 of file gdiplusmatrix.h.

194  {
196  }
GLuint GLuint GLsizei count
Definition: gl.h:1545
Status SetStatus(Status status) const
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count)
Definition: matrix.c:363

◆ TransformVectors() [1/2]

Status Matrix::TransformVectors ( Point pts,
INT  count 
)
inline

Definition at line 199 of file gdiplusmatrix.h.

200  {
202  }
GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count)
Definition: matrix.c:467
GLuint GLuint GLsizei count
Definition: gl.h:1545
Status SetStatus(Status status) const
GpMatrix * nativeMatrix

◆ TransformVectors() [2/2]

Status Matrix::TransformVectors ( PointF pts,
INT  count 
)
inline

Definition at line 205 of file gdiplusmatrix.h.

206  {
208  }
GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count)
Definition: matrix.c:445
GLuint GLuint GLsizei count
Definition: gl.h:1545
Status SetStatus(Status status) const
GpMatrix * nativeMatrix

◆ Translate()

Status Matrix::Translate ( REAL  offsetX,
REAL  offsetY,
MatrixOrder  order = MatrixOrderPrepend 
)
inline

Definition at line 211 of file gdiplusmatrix.h.

212  {
213  return SetStatus(DllExports::GdipTranslateMatrix(nativeMatrix, offsetX, offsetY, order));
214  }
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
Status SetStatus(Status status) const
GpMatrix * nativeMatrix
GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY, GpMatrixOrder order)
Definition: matrix.c:418

Friends And Related Function Documentation

◆ Brush

friend class Brush
friend

Definition at line 27 of file gdiplusmatrix.h.

◆ getNat

GpMatrix*& getNat ( const Matrix matrix)
friend

Definition at line 234 of file gdiplusmatrix.h.

235  {
236  return const_cast<Matrix *>(matrix)->nativeMatrix;
237  }
GLuint GLenum matrix
Definition: glext.h:9407

Referenced by Equals(), and Multiply().

◆ GraphicsPath

friend class GraphicsPath
friend

Definition at line 26 of file gdiplusmatrix.h.

◆ LinearGradientBrush

friend class LinearGradientBrush
friend

Definition at line 28 of file gdiplusmatrix.h.

◆ Pen

friend class Pen
friend

Definition at line 24 of file gdiplusmatrix.h.

◆ Region

friend class Region
friend

Definition at line 25 of file gdiplusmatrix.h.

◆ TextureBrush

friend class TextureBrush
friend

Definition at line 29 of file gdiplusmatrix.h.

Member Data Documentation

◆ lastStatus

Status Matrix::lastStatus
mutableprotected

Definition at line 218 of file gdiplusmatrix.h.

Referenced by Clone(), GetLastStatus(), Matrix(), and SetStatus().

◆ nativeMatrix


The documentation for this class was generated from the following file: