wxWidgets: wxGraphicsMatrix Class Reference

| Version: 3.0.4

Public Member Functions | List of all members
wxGraphicsMatrix Class Reference
Class List by Category » Graphics Device Interface (GDI)

`#include </usr/src/ports/wxWidgets3.0/wxWidgets3.0-3.0.4-1.x86_64/src/wxWidgets-3.0.4/interface/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

<>< =''>:</>&;&;< =''>\ </></>

## Public Member Functions
virtual void | Concat (const wxGraphicsMatrix *t)
| Concatenates the matrix passed with the current matrix. More...
void | Concat (const wxGraphicsMatrix &t)
| Concatenates the matrix passed with the current matrix. More...
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. More...
virtual void * | GetNativeMatrix () const
| Returns the native representation of the matrix. More...
virtual void | Invert ()
| Inverts the matrix. More...
virtual bool | IsEqual (const wxGraphicsMatrix *t) const
| Returns true if the elements of the transformation matrix are equal. More...
bool | IsEqual (const wxGraphicsMatrix &t) const
| Returns true if the elements of the transformation matrix are equal. More...
virtual bool | IsIdentity () const
| Return true if this is the identity matrix. More...
virtual void | Rotate (wxDouble angle)
| Rotates this matrix clockwise (in radians). More...
virtual void | Scale (wxDouble xScale, wxDouble yScale)
| Scales this matrix. More...
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). More...
virtual void | TransformDistance (wxDouble *dx, wxDouble *dy) const
| Applies this matrix to a distance (ie. More...
virtual void | TransformPoint (wxDouble *x, wxDouble *y) const
| Applies this matrix to a point. More...
virtual void | Translate (wxDouble dx, wxDouble dy)
| Translates this matrix. More...
Public Member Functions inherited from wxGraphicsObject
wxGraphicsRenderer * | GetRenderer () const
| Returns the renderer that was used to create this instance, or NULL if it has not been initialized yet. More...
bool | IsNull () const
Public Member Functions inherited from wxObject
| wxObject ()
| Default ctor; initializes to NULL the internal reference data. More...
| wxObject (const wxObject &other)
| Copy ctor. More...
virtual | ~wxObject ()
| Destructor. More...
virtual wxClassInfo * | GetClassInfo () const
| This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). More...
wxObjectRefData * | GetRefData () const
| Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. More...
bool | IsKindOf (const wxClassInfo *info) const
| Determines whether this class is a subclass of (or the same class as) the given class. More...
bool | IsSameAs (const wxObject &obj) const
| Returns true if this object has the same data pointer as obj. More...
void | Ref (const wxObject &clone)
| Makes this object refer to the data in clone. More...
void | SetRefData (wxObjectRefData *data)
| Sets the wxObject::m_refData pointer. More...
void | UnRef ()
| Decrements the reference count in the associated data, and if it is zero, deletes the data. More...
void | UnShare ()
| This is the same of AllocExclusive() but this method is public. More...
void | operator delete (void *buf)
| The delete operator is defined for debugging versions of the library only, when the identifier `WXDEBUG` is defined. More...
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
| The new operator is defined for debugging versions of the library only, when the identifier `WXDEBUG` is defined. More...

## Additional Inherited Members
Protected Member Functions inherited from wxObject
void | AllocExclusive ()
| Ensure that this object's data is not shared with any other object. More...
virtual wxObjectRefData * | CreateRefData () const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. More...
virtual wxObjectRefData * | CloneRefData (const wxObjectRefData *data) const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. More...
Protected Attributes inherited from wxObject
wxObjectRefData * | m_refData
| Pointer to an object which is the object's reference-counted data. More...

## Member Function Documentation

## ◆ Concat() [1/2]

virtual void wxGraphicsMatrix::Concat | ( | const wxGraphicsMatrix * | t | ) |
| virtual

Concatenates the matrix passed with the current matrix.

## ◆ Concat() [2/2]

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

Concatenates the matrix passed with the current matrix.

## ◆ Get()

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.

## ◆ GetNativeMatrix()

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.

## ◆ Invert()

virtual void wxGraphicsMatrix::Invert | ( |  | ) |
| virtual

Inverts the matrix.

## ◆ IsEqual() [1/2]

virtual bool wxGraphicsMatrix::IsEqual | ( | const wxGraphicsMatrix * | t | ) | const
| virtual

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

## ◆ IsEqual() [2/2]

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

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

## ◆ IsIdentity()

virtual bool wxGraphicsMatrix::IsIdentity | ( |  | ) | const
| virtual

Return true if this is the identity matrix.

## ◆ Rotate()

virtual void wxGraphicsMatrix::Rotate | ( | wxDouble | angle | ) |
| virtual

Rotates this matrix clockwise (in radians).

Parameters

  angle | Rotation angle in radians, clockwise.

## ◆ Scale()

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

Scales this matrix.

## ◆ Set()

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).

## ◆ TransformDistance()

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

Applies this matrix to a distance (ie.

performs all transforms except translations).

## ◆ TransformPoint()

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

Applies this matrix to a point.

## ◆ Translate()

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

Translates this matrix.