| Package | graphics.geom |
| Class | public class GradientMatrix |
| Inheritance | GradientMatrix flash.geom.Matrix |
| Method | Defined By | ||
|---|---|---|---|
GradientMatrix(a:Number = 1, b:Number = 0, c:Number = 0, d:Number = 1, tx:Number = 0, ty:Number = 0)
Creates a new GradientMatrix instance with the specified parameters. | GradientMatrix | ||
clone():Matrix [override]
Returns a new GradientMatrix object that is a clone of this matrix, with an exact copy of the contained object. | GradientMatrix | ||
createGradientBox(width:Number, height:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void [override]
Creates the specific style of matrix expected by the beginGradientFill() and lineGradientStyle() methods of the Graphics class. | GradientMatrix | ||
| GradientMatrix | () | Constructor |
public function GradientMatrix(a:Number = 1, b:Number = 0, c:Number = 0, d:Number = 1, tx:Number = 0, ty:Number = 0)Creates a new GradientMatrix instance with the specified parameters.
Parametersa:Number (default = 1) — The value that affects the positioning of pixels along the x axis when scaling or rotating an image.
| |
b:Number (default = 0) — The value that affects the positioning of pixels along the y axis when rotating or skewing an image.
| |
c:Number (default = 0) — The value that affects the positioning of pixels along the x axis when rotating or skewing an image.
| |
d:Number (default = 1) — The value that affects the positioning of pixels along the y axis when scaling or rotating an image.
| |
tx:Number (default = 0) — The distance by which to translate each point along the x axis.
| |
ty:Number (default = 0) — The distance by which to translate each point along the y axis.
|
| clone | () | method |
override public function clone():MatrixReturns a new GradientMatrix object that is a clone of this matrix, with an exact copy of the contained object.
ReturnsMatrix — a new GradientMatrix object that is a clone of this matrix, with an exact copy of the contained object.
|
| createGradientBox | () | method |
override public function createGradientBox(width:Number, height:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):voidCreates the specific style of matrix expected by the beginGradientFill() and lineGradientStyle() methods of the Graphics class. Width and height are scaled to a scaleX / scaleY pair and the tx / ty values are offset by half the width and height (This method fix the problem of order of matrix operations).
Parameters
width:Number — The width of the gradient box.
| |
height:Number — The height of the gradient box.
| |
rotation:Number (default = 0) — The amount to rotate, in radians.
| |
tx:Number (default = 0) — The distance, in pixels, to translate to the right along the x axis. This value is offset by half of the width parameter.
| |
ty:Number (default = 0) — The distance, in pixels, to translate down along the y axis. This value is offset by half of the height parameter.
|