Module pinky :: Class Matrix

Class Matrix

object --+
         |
        Matrix

A transformation matrix.

Instance Methods
 
__init__(self, a=1.0, b=0.0, c=0.0, d=1.0, e=0.0, f=0.0)
Initialize a matrix from the given components.
 
__str__(self)
str(x)
 
__repr__(self)
repr(x)
 
__mul__(self, other)
Multiply with another matrix.
 
transform(self, shape)
Get a transformed copy of a point tuple or shape.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods
 
parse(cls, transform_list_str)
 
from_translate(cls, tx, ty=0.0)
Create a translation matrix.
 
from_scale(cls, sx, sy=None)
Create a scale matrix.
 
from_rotate_deg(cls, angle, *args)
Create a rotation matrix.
 
from_skew_x_deg(cls, angle)
Create a horizontal skew matrix.
 
from_skew_y_deg(cls, angle)
Create a vertical skew matrix.
 
from_flip_x(cls)
Create a horizontal flip matrix.
 
from_flip_y(cls)
Create a vertical flip matrix.
Properties

Inherited from object: __class__

Method Details

__init__(self, a=1.0, b=0.0, c=0.0, d=1.0, e=0.0, f=0.0)
(Constructor)

 

Initialize a matrix from the given components.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)