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 wx.GraphicsContext.CreateMatrix
or wx.GraphicsRenderer.CreateMatrix
.
Concatenates the matrix passed with the current matrix. |
|
Returns the component values of the matrix via the argument pointers. |
|
Returns the native representation of the matrix. |
|
Inverts the matrix. |
|
Returns |
|
Return |
|
Rotates this matrix clockwise (in radians). |
|
Scales this matrix. |
|
Sets the matrix to the respective values (default values are the identity matrix). |
|
Applies this matrix to a distance (ie. |
|
Applies this matrix to a point. |
|
Translates this matrix. |
See |
wx.
GraphicsMatrix
(GraphicsObject)¶A GraphicsMatrix is a native representation of an affine matrix.
Concat
(self, t)¶Concatenates the matrix passed with the current matrix.
The effect of the resulting transformation is to first apply the transformation in t to the coordinates and then apply the transformation in the current matrix to the coordinates.
# matrix = t * matrix
t (wx.GraphicsMatrix) – The parameter matrix is the multiplicand.
Get
(self)¶Returns the component values of the matrix via the argument pointers.
tuple
( a, b, c, d, tx, ty )
GetNativeMatrix
(self)¶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
(self)¶Inverts the matrix.
IsEqual
(self, t)¶Returns True
if the elements of the transformation matrix are equal.
t (wx.GraphicsMatrix) –
bool
IsIdentity
(self)¶Return True
if this is the identity matrix.
bool
Rotate
(self, angle)¶Rotates this matrix clockwise (in radians).
angle (wx.Double) – Rotation angle in radians, clockwise.
Scale
(self, xScale, yScale)¶Scales this matrix.
xScale (wx.Double) –
yScale (wx.Double) –
Set
(self, 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).
a (wx.Double) –
b (wx.Double) –
c (wx.Double) –
d (wx.Double) –
tx (wx.Double) –
ty (wx.Double) –
TransformDistance
(self, dx, dy)¶Applies this matrix to a distance (ie.
performs all transforms except translations).
dx (wx.Double) –
dy (wx.Double) –
tuple
( dx, dy )
TransformPoint
(self, x, y)¶Applies this matrix to a point.
x (wx.Double) –
y (wx.Double) –
tuple
( x, y )
Translate
(self, dx, dy)¶Translates this matrix.
dx (wx.Double) –
dy (wx.Double) –
NativeMatrix
¶See GetNativeMatrix