Table Of Contents

Previous topic

GraphicsGradientStops

Next topic

GraphicsObject

This Page

phoenix_title 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 coordinante spaces.


class_hierarchy Inheritance Diagram

Inheritance diagram for class GraphicsMatrix

Inheritance diagram of GraphicsMatrix


super_classes Known Superclasses

lib.graphics.GraphicsObject


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 matricies are equal.
IsIdentity Returns True if this is the identity matrix.
Rotate Rotates the matrix in radians
Scale Scale the matrix
Set Set the componenets 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 metrix. 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 coordinante 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 matricies are equal.



IsIdentity()

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 componenets 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 metrix. This shifts the origin.