wx.GraphicsMatrix

Inheritance diagram for wx.GraphicsMatrix:



Description

A wx.GraphicsMatrix 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 a CreateMatrix call on the graphics context or the renderer instance.

Derived From

Class API

Methods

__init__()
No docstrings available for this method.

Concat(t)

Concatenates the matrix passed with the current matrix.

Parameters:


Get()

Gets the component values of the matrix and returns them as a tuple.


Returns:

(a, b, c, d, tx, ty)


GetNativeMatrix()

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.


Returns:

void

Note

For wxPython we still need a way to make this value usable.


Invert()
Inverts the matrix.

IsEqual(t)

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

Parameters:


Returns:

bool


IsIdentity()

Return True if this is the identity matrix.


Returns:

bool


Rotate(angle)

Rotates this matrix (radians).

Parameters:

  • angle (double)

Scale(xScale, yScale)

Scales this matrix.

Parameters:

  • xScale (double)
  • yScale (double)

Set(a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0)

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

Parameters:

  • a (double)
  • b (double)
  • c (double)
  • d (double)
  • tx (double)
  • ty (double)

TransformDistance(dx, dy)

Applies this matrix to a distance (ie. performs all transforms except translations)

Parameters:

  • dx (double)
  • dy (double)

Returns:

(dx, dy)


TransformPoint(x, y)

Applies this matrix to a point.

Parameters:

  • x (double)
  • y (double)

Returns:

(x, y)


Translate(dx, dy)

Translates this matrix.

Parameters:

  • dx (double)
  • dy (double)