Packagecom.esri.aws.awx.map.layers.overlays.style
Classpublic class GradientPolygonStyle
InheritanceGradientPolygonStyle Inheritance BaseStyle
ImplementsIStyle

GradientPolygonStyle is an advanced gradient renderer for polygons.

Note: Although styles have public properties (such as color, fill, alpha) they should not be edited after construction.

See also

http://livedocs.adobe.com/flex/201/langref/flash/display/Graphics.html#beginGradientFill()


Public Properties
 PropertyDefined by
  alphas : Array
The array of alpha values for the corresponding colors in the colors array; valid values are 0 to 1.
GradientPolygonStyle
  colors : Array
The array of RGB hexadecimal color values to be used in the gradient; for example, red is 0xFF0000, blue is 0x0000FF, and so on.
GradientPolygonStyle
  focalPointRatio : Number
The location of the focal point of the gradient.
GradientPolygonStyle
  interpolationMethod : String
The interpolation method to use, either InterpolationMethod.linearRGB or InterpolationMethod.RGB.
GradientPolygonStyle
  matrix : Matrix
The transformation matrix as defined by the flash.geom.Matrix class.
GradientPolygonStyle
  ratios : Array
The array of color distribution ratios; valid values are 0 to 255.
GradientPolygonStyle
  spreadMethod : String
The spread method to use, either: SpreadMethod.PAD, SpreadMethod.REFLECT, or SpreadMethod.REPEAT.
GradientPolygonStyle
  type : String
The gradient type to use: GradientType.LINEAR or GradientType.RADIAL.
GradientPolygonStyle
Public Methods
 MethodDefined by
  
GradientPolygonStyle(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 GradientPolygonStyle.
GradientPolygonStyle
 Inherited
cleanUp(overlayObject:OverlayObject):void
Cleans up the OverlayObject to restore it to its original state.
BaseStyle
  
draw(overlayObject:OverlayObject, projectionModel:IProjectionModel):void
Draws the polyline.
GradientPolygonStyle
Property detail
alphasproperty
public var alphas:Array

The 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.

colorsproperty 
public var colors:Array

The 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.

focalPointRatioproperty 
public var focalPointRatio:Number

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. For example, the following example shows a focalPointRatio set to 0.75.

interpolationMethodproperty 
public var interpolationMethod:String

The interpolation method to use, either InterpolationMethod.linearRGB or InterpolationMethod.RGB.

matrixproperty 
public var matrix:Matrix

The 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.

ratiosproperty 
public var ratios:Array

The 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.

spreadMethodproperty 
public var spreadMethod:String

The spread method to use, either: SpreadMethod.PAD, SpreadMethod.REFLECT, or SpreadMethod.REPEAT.

typeproperty 
public var type:String

The gradient type to use: GradientType.LINEAR or GradientType.RADIAL.

Constructor detail
GradientPolygonStyle()constructor
public function GradientPolygonStyle(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 GradientPolygonStyle.

Parameters
type:String (default = null) — The gradient type to use: GradientType.LINEAR or GradientType.RADIAL.
 
colors:Array (default = null) — The 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) — The 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) — The 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") — The spread method to use, either: SpreadMethod.PAD, SpreadMethod.REFLECT, or SpreadMethod.REPEAT.
 
interpolationMethod:String (default = "rgb") — The interpolation method to use: InterpolationMethod.linearRGB or InterpolationMethod.RGB.
 
focalPointRatio:Number (default = 0) — 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. For example, the following example shows a focalPointRatio set to 0.75.
Method detail
draw()method
public override function draw(overlayObject:OverlayObject, projectionModel:IProjectionModel):void

Draws the polyline.

Parameters
overlayObject:OverlayObject — the overlayObject on which to draw.
 
projectionModel:IProjectionModel — the project model used to calculate the pixel coordinates