wx.lib.graphics.GraphicsMatrix¶
A matrix holds an affine transformations, such as a scale, rotation, shear, or a combination of these, and is used to convert between different coordinate spaces.
Class Hierarchy¶
Known Superclasses¶
wx.lib.graphics.GraphicsObject
Methods Summary¶
Initialize self. See help(type(self)) for accurate signature. |
|
Concatenates the matrix passed with the current matrix. |
|
Return the component values of the matrix as a tuple. |
|
Inverts the matrix. |
|
Returns |
|
Returns |
|
Rotates the matrix in radians |
|
Scale the matrix |
|
Set the components of the matrix by value, default values |
|
Applies this matrix to a distance (ie. performs all transforms |
|
Applies this matrix to a point and returns the result |
|
Translate the matrix. This shifts the origin. |
Class API¶
- class GraphicsMatrix(GraphicsObject)¶
A matrix holds an affine transformations, such as a scale, rotation, shear, or a combination of these, and is used to convert between different coordinate spaces.
Methods¶
- __init__(self)¶
Initialize self. See help(type(self)) for accurate signature.
- Clone(self)¶
- Concat(self, matrix) Self ¶
Concatenates the matrix passed with the current matrix.
- Get(self)¶
Return the component values of the matrix as a tuple.
- GetNativeMatrix(self)¶
- Invert(self) Self ¶
Inverts the matrix.
- IsEqual(self, matrix)¶
Returns
True
if the elements of the transformation matrices are equal.
- IsIdentity(self)¶
Returns
True
if this is the identity matrix.
- Rotate(self, angle) Self ¶
Rotates the matrix in radians
- Scale(self, xScale, yScale) Self ¶
Scale the matrix
- Set(self, a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0)¶
Set the components of the matrix by value, default values are the identity matrix.
- TransformDistance(self, dx, dy)¶
Applies this matrix to a distance (ie. performs all transforms except translations.)
- TransformPoint(self, x, y)¶
Applies this matrix to a point and returns the result
- Translate(self, dx, dy) Self ¶
Translate the matrix. This shifts the origin.