| Package | graphics |
| Class | public class LineGradientStyle |
| Inheritance | LineGradientStyle GradientStyle Object |
| Implements | ILineStyle |
| Method | Defined By | ||
|---|---|---|---|
LineGradientStyle(type:String = null, colors:Array = null, alphas:Array = null, ratios:Array = null, matrix:Matrix = null, spreadMethod:String = pad, interpolationMethod:String = rgb, focalPointRatio:Number = 0)
Creates a new LineGradientStyle instance. | LineGradientStyle | ||
apply(graphic:Graphics):void
Initialize and launch the lineGradientStyle method of the specified Graphics reference. | LineGradientStyle | ||
clone():*
Creates and returns a shallow copy of the object. | LineGradientStyle | ||
equals(o:*):Boolean
Compares the specified object with this object for equality. | LineGradientStyle | ||
![]() | toSource(indent:int = 0):String
Returns the source code string representation of the object. | GradientStyle | |
| LineGradientStyle | () | Constructor |
public function LineGradientStyle(type:String = null, colors:Array = null, alphas:Array = null, ratios:Array = null, matrix:Matrix = null, spreadMethod:String = pad, interpolationMethod:String = rgb, focalPointRatio:Number = 0)Creates a new LineGradientStyle instance.
Parameterstype:String (default = null) — A value from the GradientType class that specifies which gradient type to use : GradientType.LINEAR or GradientType.RADIAL.
| |
colors:Array (default = null) — An array of RGB hexadecimal color values to be used in the gradient; for example, red is 0xFF0000, blue is 0x0000FF, and so on. You can specify up to 15 colors. For each color, be sure you specify a corresponding value in the alphas and ratios parameters.
| |
alphas:Array (default = null) — An array of alpha values for the corresponding colors in the colors array; valid values are 0 to 1. If the value is less than 0, the default is 0. If the value is greater than 1, the default is 1.
| |
ratios:Array (default = null) — An array of color distribution ratios; valid values are 0 to 255. This value defines the percentage of the width where the color is sampled at 100%. The value 0 represents the left-hand position in the gradient box, and 255 represents the right-hand position in the gradient box.
| |
matrix:Matrix (default = null) — A transformation matrix as defined by the flash.geom.Matrix class. The flash.geom.Matrix class includes a createGradientBox() method, which lets you conveniently set up the matrix for use with the beginGradientFill() method.
| |
spreadMethod:String (default = pad) — A value from the SpreadMethod class that specifies which spread method to use, either: SpreadMethod.PAD, SpreadMethod.REFLECT, or SpreadMethod.REPEAT.
| |
interpolationMethod:String (default = rgb) — A value from the InterpolationMethod class that specifies which value to use: InterpolationMethod.linearRGB or InterpolationMethod.RGB.
| |
focalPointRatio:Number (default = 0) — A number that controls the location of the focal point of the gradient. 0 means that the focal point is in the center. 1 means that the focal point is at one border of the gradient circle. -1 means that the focal point is at the other border of the gradient circle. A value less than -1 or greater than 1 is rounded to -1 or 1.
|
| apply | () | method |
public function apply(graphic:Graphics):voidInitialize and launch the lineGradientStyle method of the specified Graphics reference.
Parameters
graphic:Graphics |
| clone | () | method |
public function clone():*Creates and returns a shallow copy of the object.
Returns* — A new object that is a shallow copy of this instance.
|
| equals | () | method |
public function equals(o:*):BooleanCompares the specified object with this object for equality.
Parameters
o:* |
Boolean — true if the the specified object is equal with this object.
|