mobile-graphic-easel-src-easeljs-geom-Matrix2D.js / js
Represents an affine transformation matrix, and provides tools for constructing and concatenating matrixes. @class Matrix2D @constructor
parameter: {Number} a Specifies the a property for the new matrix.
parameter: {Number} b Specifies the b property for the new matrix.
parameter: {Number} c Specifies the c property for the new matrix.
parameter: {Number} d Specifies the d property for the new matrix.
parameter: {Number} tx Specifies the tx property for the new matrix.
parameter: {Number} ty Specifies the ty property for the new matrix.
An identity matrix, representing a null transformation. Read-only. @property identity @static @type Matrix2D
Multiplier for converting degrees to radians. Used internally by Matrix2D. Read-only. @property DEG_TO_RAD @static @final @type Number
Position (0, 0) in a 3x3 affine transformation matrix. @property a @type Number
Position (0, 1) in a 3x3 affine transformation matrix. @property b @type Number
Position (1, 0) in a 3x3 affine transformation matrix. @property c @type Number
Position (1, 1) in a 3x3 affine transformation matrix. @property d @type Number
Position (2, 0) in a 3x3 affine transformation matrix. @property tx @type Number
Position (2, 1) in a 3x3 affine transformation matrix. @property ty @type Number
Property representing the alpha that will be applied to a display object. This is not part of matrix operations, but is used for operations like getConcatenatedMatrix to provide concatenated alpha values. @property alpha @type Number
Property representing the shadow that will be applied to a display object. This is not part of matrix operations, but is used for operations like getConcatenatedMatrix to provide concatenated shadow values. @property shadow @type Shadow
Property representing the compositeOperation that will be applied to a display object. This is not part of matrix operations, but is used for operations like getConcatenatedMatrix to provide concatenated compositeOperation values. You can find a list of valid composite operations at: <a href="https://developer.mozilla.org/en/Canvas_tutorial/Compositing">developer.mozilla.org/en/Canvas_tutorial/Compositing</a> @property compositeOperation @type String
Initialization method. @method initialize @protected
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Concatenates the specified matrix properties with this matrix. All parameters are required. @method prepend
parameter: {Number} a
parameter: {Number} b
parameter: {Number} c
parameter: {Number} d
parameter: {Number} tx
parameter: {Number} ty
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Appends the specified matrix properties with this matrix. All parameters are required. @method append
parameter: {Number} a
parameter: {Number} b
parameter: {Number} c
parameter: {Number} d
parameter: {Number} tx
parameter: {Number} ty
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Prepends the specified matrix with this matrix. @method prependMatrix
parameter: {Matrix2D} matrix
Appends the specified matrix with this matrix. @method appendMatrix
parameter: {Matrix2D} matrix
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Generates matrix properties from the specified display object transform properties, and prepends them with this matrix. For example, you can use this to generate a matrix from a display object: var mtx = new Matrix2D(); mtx.prependTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation); @method prependTransform
parameter: {Number} x
parameter: {Number} y
parameter: {Number} scaleX
parameter: {Number} scaleY
parameter: {Number} rotation
parameter: {Number} skewX
parameter: {Number} skewY
parameter: {Number} regX Optional.
parameter: {Number} regY Optional.
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Generates matrix properties from the specified display object transform properties, and appends them with this matrix. For example, you can use this to generate a matrix from a display object: var mtx = new Matrix2D(); mtx.appendTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation); @method appendTransform
parameter: {Number} x
parameter: {Number} y
parameter: {Number} scaleX
parameter: {Number} scaleY
parameter: {Number} rotation
parameter: {Number} skewX
parameter: {Number} skewY
parameter: {Number} regX Optional.
parameter: {Number} regY Optional.
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Applies a rotation transformation to the matrix. @method rotate
parameter: {Number} angle The angle in radians. To use degrees, multiply byMath.PI/180
.
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Applies a skew transformation to the matrix. @method skew
parameter: {Number} skewX The amount to skew horizontally in degrees.
parameter: {Number} skewY The amount to skew vertically in degrees.
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Applies a scale transformation to the matrix. @method scale
parameter: {Number} x
parameter: {Number} y
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Translates the matrix on the x and y axes. @method translate
parameter: {Number} x
parameter: {Number} y
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Sets the properties of the matrix to those of an identity matrix (one that applies a null transformation). @method identity
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Inverts the matrix, causing it to perform the opposite transformation. @method invert
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Returns true if the matrix is an identity matrix. @method isIdentity
returns: {Boolean}
Decomposes the matrix into transform properties (x, y, scaleX, scaleY, and rotation). Note that this these values may not match the transform properties you used to generate the matrix, though they will produce the same visual results. @method decompose
parameter: {Object} target The object to apply the transform properties to. If null, then a new object will be returned.
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Reinitializes all matrix properties to those specified. @method appendProperties
parameter: {Number} a
parameter: {Number} b
parameter: {Number} c
parameter: {Number} d
parameter: {Number} tx
parameter: {Number} ty
parameter: {Number} alpha desired alpha value
parameter: {Shadow} shadow desired shadow value
parameter: {String} compositeOperation desired composite operation value
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Appends the specified visual properties to the current matrix. @method appendProperties
parameter: {Number} alpha desired alpha value
parameter: {Shadow} shadow desired shadow value
parameter: {String} compositeOperation desired composite operation value
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Prepends the specified visual properties to the current matrix. @method prependProperties
parameter: {Number} alpha desired alpha value
parameter: {Shadow} shadow desired shadow value
parameter: {String} compositeOperation desired composite operation value
returns: {Matrix2D} This matrix. Useful for chaining method calls.
Returns a clone of the Matrix2D instance. @method clone
returns: {Matrix2D} a clone of the Matrix2D instance.
Returns a string representation of this object. @method toString
returns: {String} a string representation of the instance.
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.