Position (0, 1) in a 3x3 affine transformation matrix.
Position (1, 0) in a 3x3 affine transformation matrix.
Position (1, 1) in a 3x3 affine transformation matrix.
Position (2, 0) in a 3x3 affine transformation matrix.
Position (2, 1) in a 3x3 affine transformation matrix.
Appends the specified matrix properties to this matrix. All parameters are required.
This is the equivalent of multiplying (this matrix) * (specified matrix)
.
This matrix. Useful for chaining method calls.
Generates matrix properties from the specified display object transform properties, and appends them to this matrix. For example, you can use this to generate a matrix representing the transformations of a display object:
var mtx = new createjs.Matrix2D();
mtx.appendTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation);
Optional
regX: numberOptional.
Optional
regY: numberOptional.
This matrix. Useful for chaining method calls.
Decomposes the matrix into transform properties (x, y, scaleX, scaleY, and rotation). Note that these values may not match the transform properties you used to generate the matrix, though they will produce the same visual results.
Optional
target: DecomposedPropsThe object to apply the transform properties to. If null, then a new object will be returned.
The target, or a new generic object with the transform properties applied.
Returns true if this matrix is equal to the specified matrix (all property values are equal).
The matrix to compare.
Prepends the specified matrix properties to this matrix.
This is the equivalent of multiplying (specified matrix) * (this matrix)
.
All parameters are required.
This matrix. Useful for chaining method calls.
Prepends the specified matrix to this matrix.
This is the equivalent of multiplying (specified matrix) * (this matrix)
.
For example, you could calculate the combined transformation for a child object using:
var o = myDisplayObject;
var mtx = o.getMatrix();
while (o = o.parent) {
// prepend each parent's transformation in turn:
o.prependMatrix(o.getMatrix());
}
This matrix. Useful for chaining method calls.
Generates matrix properties from the specified display object transform properties, and prepends them to this matrix. For example, you could calculate the combined transformation for a child object using:
var o = myDisplayObject;
var mtx = new createjs.Matrix2D();
do {
// prepend each parent's transformation in turn:
mtx.prependTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation, o.skewX, o.skewY, o.regX, o.regY);
} while (o = o.parent);
Optional
regX: numberOptional.
Optional
regY: numberOptional.
This matrix. Useful for chaining method calls.
Applies a scale transformation to the matrix.
The amount to scale horizontally. E.G. a value of 2 will double the size in the X direction, and 0.5 will halve it.
The amount to scale vertically.
This matrix. Useful for chaining method calls.
Sets the specified values on this instance.
Optional
a: numberSpecifies the a property for the new matrix.
Optional
b: numberSpecifies the b property for the new matrix.
Optional
c: numberSpecifies the c property for the new matrix.
Optional
d: numberSpecifies the d property for the new matrix.
Optional
tx: numberSpecifies the tx property for the new matrix.
Optional
ty: numberSpecifies the ty property for the new matrix.
This instance. Useful for chaining method calls.
Applies a skew transformation to the matrix.
The amount to skew horizontally in degrees. To use a value in radians, multiply it by 180/Math.PI
.
The amount to skew vertically in degrees.
This matrix. Useful for chaining method calls.
Transforms a point according to this matrix.
The x component of the point to transform.
The y component of the point to transform.
Optional
pt: anyAn object to copy the result into. If omitted a generic object with x/y properties will be returned.
This matrix. Useful for chaining method calls.
Position (0, 0) in a 3x3 affine transformation matrix.