# wxGraphicsMatrix Class Reference
[Graphics Device Interface (GDI)]

`#include <wx/graphics.h>`

Inheritance diagram for wxGraphicsMatrix:
[legend]

## Detailed Description

A wxGraphicsMatrix is a native representation of an affine matrix.

The contents are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via wxGraphicsContext::CreateMatrix() or wxGraphicsRenderer::CreateMatrix().

##

Library: wxCore

Category: Graphics Device Interface (GDI)

## Public Member Functions
virtual void | Concat (const wxGraphicsMatrix *t)
| Concatenates the matrix passed with the current matrix.
void | Concat (const wxGraphicsMatrix &t)
| Concatenates the matrix passed with the current matrix.
virtual void | Get (wxDouble *a=NULL, wxDouble *b=NULL, wxDouble *c=NULL, wxDouble *d=NULL, wxDouble *tx=NULL, wxDouble *ty=NULL) const
| Returns the component values of the matrix via the argument pointers.
virtual void * | GetNativeMatrix () const
| Returns the native representation of the matrix.
virtual void | Invert ()
| Inverts the matrix.
virtual bool | IsEqual (const wxGraphicsMatrix *t) const
| Returns true if the elements of the transformation matrix are equal.
bool | IsEqual (const wxGraphicsMatrix &t) const
| Returns true if the elements of the transformation matrix are equal.
virtual bool | IsIdentity () const
| Return true if this is the identity matrix.
virtual void | Rotate (wxDouble angle)
| Rotates this matrix (in radians).
virtual void | Scale (wxDouble xScale, wxDouble yScale)
| Scales this matrix.
virtual void | Set (wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, wxDouble tx=0.0, wxDouble ty=0.0)
| Sets the matrix to the respective values (default values are the identity matrix).
virtual void | TransformDistance (wxDouble *dx, wxDouble *dy) const
| Applies this matrix to a distance (ie.
virtual void | TransformPoint (wxDouble *x, wxDouble *y) const
| Applies this matrix to a point.
virtual void | Translate (wxDouble dx, wxDouble dy)
| Translates this matrix.

List of all members.

## Member Function Documentation

void wxGraphicsMatrix::Concat | ( | const wxGraphicsMatrix & | t | ) |

Concatenates the matrix passed with the current matrix.

virtual void wxGraphicsMatrix::Concat | ( | const wxGraphicsMatrix * | t | ) | `[virtual]`

Concatenates the matrix passed with the current matrix.

virtual void wxGraphicsMatrix::Get | ( | wxDouble * | a = `NULL`,
|  | wxDouble * | b = `NULL`,
|  | wxDouble * | c = `NULL`,
|  | wxDouble * | d = `NULL`,
|  | wxDouble * | tx = `NULL`,
|  | wxDouble * | ty = `NULL` |
| ) |  |  | const`[virtual]`

Returns the component values of the matrix via the argument pointers.

virtual void* wxGraphicsMatrix::GetNativeMatrix | ( |  | ) | const`[virtual]`

Returns the native representation of the matrix.

For CoreGraphics this is a CFAffineMatrix pointer, for GDIPlus a Matrix Pointer, and for Cairo a cairo_matrix_t pointer.

virtual void wxGraphicsMatrix::Invert | ( |  | ) | `[virtual]`

Inverts the matrix.

bool wxGraphicsMatrix::IsEqual | ( | const wxGraphicsMatrix & | t | ) | const

Returns true if the elements of the transformation matrix are equal.

virtual bool wxGraphicsMatrix::IsEqual | ( | const wxGraphicsMatrix * | t | ) | const`[virtual]`

Returns true if the elements of the transformation matrix are equal.

virtual bool wxGraphicsMatrix::IsIdentity | ( |  | ) | const`[virtual]`

Return true if this is the identity matrix.

virtual void wxGraphicsMatrix::Rotate | ( | wxDouble | angle | ) | `[virtual]`

Rotates this matrix (in radians).

virtual void wxGraphicsMatrix::Scale | ( | wxDouble | xScale,
|  | wxDouble | yScale |
| ) |  |  | `[virtual]`

Scales this matrix.

virtual void wxGraphicsMatrix::Set | ( | wxDouble | a = `1.0`,
|  | wxDouble | b = `0.0`,
|  | wxDouble | c = `0.0`,
|  | wxDouble | d = `1.0`,
|  | wxDouble | tx = `0.0`,
|  | wxDouble | ty = `0.0` |
| ) |  |  | `[virtual]`

Sets the matrix to the respective values (default values are the identity matrix).

virtual void wxGraphicsMatrix::TransformDistance | ( | wxDouble * | dx,
|  | wxDouble * | dy |
| ) |  |  | const`[virtual]`

Applies this matrix to a distance (ie.

performs all transforms except translations).

virtual void wxGraphicsMatrix::TransformPoint | ( | wxDouble * | x,
|  | wxDouble * | y |
| ) |  |  | const`[virtual]`

Applies this matrix to a point.

virtual void wxGraphicsMatrix::Translate | ( | wxDouble | dx,
|  | wxDouble | dy |
| ) |  |  | `[virtual]`

Translates this matrix.

|  | [ top ]