Phoenix Logo

phoenix_title 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 Class Hierarchy

Inheritance diagram for class GraphicsMatrix:

method_summary Methods Summary

__init__  
Clone  
Concat Concatenates the matrix passed with the current matrix.
Get Return the component values of the matrix as a tuple.
GetNativeMatrix  
Invert Inverts the matrix.
IsEqual Returns True if the elements of the transformation matrices are equal.
IsIdentity Returns True if this is the identity matrix.
Rotate Rotates the matrix in radians
Scale Scale the matrix
Set Set the components of the matrix by value, default values
TransformDistance Applies this matrix to a distance (ie. performs all transforms
TransformPoint Applies this matrix to a point and returns the result
Translate Translate the matrix. This shifts the origin.

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


Clone(self)


Concat(self, matrix)

Concatenates the matrix passed with the current matrix.



Get(self)

Return the component values of the matrix as a tuple.



GetNativeMatrix(self)


Invert(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)

Rotates the matrix in radians



Scale(self, xScale, yScale)

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)

Translate the matrix. This shifts the origin.