| Package | pegas.draw |
| Class | public final class FillGradientStyle |
| Inheritance | FillGradientStyle CoreObject |
| Implements | IFillStyle |
| Property | Defined by | ||
|---|---|---|---|
| alphas : Array
An array of alpha values for the corresponding colors in the colors array; valid values are 0 to 1.
| FillGradientStyle | ||
| colors : Array
An array of RGB hexadecimal color values to be used in the gradient ;
for example, red is 0xFF0000, blue is 0x0000FF, and so on.
| FillGradientStyle | ||
| focalPointRatio : Number
A number that controls the location of the focal point of the gradient.
| FillGradientStyle | ||
| interpolationMethod : String
A value from the InterpolationMethod class that specifies which value to use : InterpolationMethod.linearRGB or InterpolationMethod.RGB
| FillGradientStyle | ||
| matrix : Matrix
A transformation matrix as defined by the flash.geom.Matrix class.
| FillGradientStyle | ||
| ratios : Array
An array of color distribution ratios; valid values are 0 to 255.
| FillGradientStyle | ||
| spreadMethod : String
A value from the SpreadMethod class that specifies which spread method to use, either: SpreadMethod.PAD, SpreadMethod.REFLECT, or SpreadMethod.REPEAT.
| FillGradientStyle | ||
| type : String
A value from the GradientType class that specifies which gradient type to use : GradientType.LINEAR or GradientType.RADIAL.
| FillGradientStyle | ||
| Method | Defined by | ||
|---|---|---|---|
|
FillGradientStyle(type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0)
Creates a new FillGradientStyle instance.
| FillGradientStyle | ||
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
|
init(graphic:Graphics):void
Initialize and launch the beginGradientFill method of the specified Graphics reference.
| FillGradientStyle | ||
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreObject | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
| alphas | property |
public var alphas:ArrayAn 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.
| colors | property |
public var colors:ArrayAn 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.
| focalPointRatio | property |
public var focalPointRatio:NumberA 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.
| interpolationMethod | property |
public var interpolationMethod:StringA value from the InterpolationMethod class that specifies which value to use : InterpolationMethod.linearRGB or InterpolationMethod.RGB
| matrix | property |
public var matrix:MatrixA 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.
| ratios | property |
public var ratios:ArrayAn 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.
| spreadMethod | property |
public var spreadMethod:StringA value from the SpreadMethod class that specifies which spread method to use, either: SpreadMethod.PAD, SpreadMethod.REFLECT, or SpreadMethod.REPEAT.
| type | property |
public var type:StringA value from the GradientType class that specifies which gradient type to use : GradientType.LINEAR or GradientType.RADIAL.
| FillGradientStyle | () | constructor |
public function FillGradientStyle(type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0)Creates a new FillGradientStyle instance.
Parameterstype:String — A value from the GradientType class that specifies which gradient type to use : GradientType.LINEAR or GradientType.RADIAL.
|
|
colors:Array — 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 — 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 — 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.
|
| init | () | method |
public function init(graphic:Graphics):voidInitialize and launch the beginGradientFill method of the specified Graphics reference.
Parametersgraphic:Graphics |