Defines a 3x2 affine 2D matrix of the following form.
| a b |
| c d |
| tx ty |
Defines a 3x2 affine 2D matrix of the following form. | |
Constructor | |
Applies the transformation defined by the Matrix to a point. | |
Returns a list of the Matrix’s properties. | |
Resizes the Matrix. | |
Adjusts the tx and ty properties. | |
Sets properties so the Matrix is now an identity matrix. | |
function scale( sx : Number, sy : Number ) : Void
Resizes the Matrix. Multiplies each x value in the Matrix (the first column) by sx. Multiplies each y value in the Matrix (the 2nd column) by sy.
var mat = new Matrix(1,1,1,1,1,1);
//mat is now (a=1, b=1, c=1, d=1, tx=1, ty=1)
mat.scale(2,3);
//mat is now (a=2, b=3, c=2, d=3, tx=2, ty=3)
var a: Number
var b: Number
var c: Number
var d: Number
var tx: Number
var ty: Number
Constructor
function Matrix( a : Number, b : Number, c : Number, d : Number, tx : Number, ty : Number )
Applies the transformation defined by the Matrix to a point.
function transformPoint( p : Point ) : Point
Applies the transformation defined by the Matrix to a point, but ignores the tx and ty properties.
function deltaTransformPoint( p : Point ) : Void
Returns a list of the Matrix’s properties.
function toString() : String
Resizes the Matrix.
function scale( sx : Number, sy : Number ) : Void
Adjusts the tx and ty properties.
function translate( tx : Number, ty : Number ) : Void
function rotate( r : Number ) : Void
Sets properties so the Matrix is now an identity matrix.
function identity() : Void
function invert() : Void
function concat( m : Matrix ) : Void
function clone() : Matrix
function createGradientBox( width : Number, height : Number, rot : Number, x : Number, y : Number )
function createBox( scalex : Number, scaley : Number, rot : Number, x : Number, y : Number )