Class Index | File Index

Classes


Class pv.Transform

Represents a transformation matrix. The transformation matrix is limited to expressing translate and uniform scale transforms only; shearing, rotation, general affine, and other transforms are not supported.

The methods on this class treat the transform as immutable, returning a copy of the transformation matrix with the specified transform applied. Note, alternatively, that the matrix fields can be get and set directly.
Defined in: Transform.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Returns a new identity transform.
Field Summary
Field Attributes Field Name and Description
 
k
The scale magnitude; defaults to 1.
 
x
The x-offset; defaults to 0.
 
y
The y-offset; defaults to 0.
Method Summary
Method Attributes Method Name and Description
 
Returns the inverse of this transformation matrix.
 
scale(k)
Returns a scaled copy of this transformation matrix.
 
times(m)
Returns this matrix post-multiplied by the specified matrix m.
 
translate(x, y)
Returns a translated copy of this transformation matrix.
Class Detail
pv.Transform()
Returns a new identity transform.
Field Detail
{number} k
The scale magnitude; defaults to 1.

{number} x
The x-offset; defaults to 0.

{number} y
The y-offset; defaults to 0.
Method Detail
{pv.Transform} invert()
Returns the inverse of this transformation matrix.
Returns:
{pv.Transform} the inverted transformation matrix.

{pv.Transform} scale(k)
Returns a scaled copy of this transformation matrix.
Parameters:
{number} k
Returns:
{pv.Transform} the scaled transformation matrix.

{pv.Transform} times(m)
Returns this matrix post-multiplied by the specified matrix m.
Parameters:
{pv.Transform} m
Returns:
{pv.Transform} the post-multiplied transformation matrix.

{pv.Transform} translate(x, y)
Returns a translated copy of this transformation matrix.
Parameters:
{number} x
the x-offset.
{number} y
the y-offset.
Returns:
{pv.Transform} the translated transformation matrix.

Documentation generated by JsDoc Toolkit 2.3.2 on Sun May 30 2010 18:10:25 GMT-0700 (PDT)