| Package | graphics |
| Class | public class GradientStyle |
| Inheritance | GradientStyle Object |
| Subclasses | FillGradientStyle, LineGradientStyle |
| Property | Defined By | ||
|---|---|---|---|
| alphas : Array
An array of alpha values for the corresponding colors in the colors array; valid values are 0 to 1. | GradientStyle | ||
| 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. | GradientStyle | ||
| focalPointRatio : Number
A number that controls the location of the focal point of the gradient. | GradientStyle | ||
| interpolationMethod : String
A value from the InterpolationMethod class that specifies which value to use : InterpolationMethod.linearRGB or InterpolationMethod.RGB
| GradientStyle | ||
| matrix : Matrix
A transformation matrix as defined by the flash.geom.Matrix class. | GradientStyle | ||
| ratios : Array
An array of color distribution ratios; valid values are 0 to 255. | GradientStyle | ||
| spreadMethod : String
A value from the SpreadMethod class that specifies which spread method to use, either: SpreadMethod.PAD, SpreadMethod.REFLECT, or SpreadMethod.REPEAT. | GradientStyle | ||
| type : String
A value from the GradientType class that specifies which gradient type to use : GradientType.LINEAR or GradientType.RADIAL. | GradientStyle | ||
| Method | Defined By | ||
|---|---|---|---|
GradientStyle(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 GradientStyle instance. | GradientStyle | ||
toSource(indent:int = 0):String
Returns the source code string representation of the object. | GradientStyle | ||
| 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.
| GradientStyle | () | Constructor |
public function GradientStyle(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 GradientStyle 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.
|
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source code string representation of the object.
Parameters
indent:int (default = 0) |
String — the source code string representation of the object.
|