Packagecom.google.maps.styles
Classpublic class GradientStyle

Class GradientStyle specifies a set of parameters for drawing gradient backgrounds of graphical objects.



Public Properties
 PropertyDefined by
  alphas : Array
An array of type Number, each of which is an alpha value matched with a corresponding element in the colors Array.
GradientStyle
  colors : Array
An array of type Number, each of which is an RGB color value to be used in the gradient style (up to 15 elements).
GradientStyle
  focalPointRatio : Number
Gradient focal point ratio.
GradientStyle
  interpolationMethod : String
Gradient interpolation method.
GradientStyle
  matrix : Matrix
Gradient transformation matrix.
GradientStyle
  ratios : Array
Color distribution ratios corresponding to the elements in the colors Array.
GradientStyle
  spreadMethod : String
Gradient spread method.
GradientStyle
  type : String
A value from the GradientType class that specifies which gradient type to use: GradientType.LINEAR or GradientType.RADIAL.
GradientStyle
Public Methods
 MethodDefined by
  
GradientStyle(params:Object = null)
Constructs a new GradientStyle instance, optionally initializing it from an object.
GradientStyle
  
toString():String
Returns a String representation of this object.
GradientStyle
Property detail
alphasproperty
public var alphas:Array

An array of type Number, each of which is an alpha value matched with a corresponding element in the colors Array.

See also

flash.display.Graphics.beginGradientFill()
colorsproperty 
public var colors:Array

An array of type Number, each of which is an RGB color value to be used in the gradient style (up to 15 elements).

See also

flash.display.Graphics.beginGradientFill()
maps.google.com.Color
focalPointRatioproperty 
public var focalPointRatio:Number

Gradient focal point ratio.

See also

flash.display.Graphics.beginGradientFill()
interpolationMethodproperty 
public var interpolationMethod:String

Gradient interpolation method.

See also

flash.display.Graphics.beginGradientFill()
matrixproperty 
public var matrix:Matrix

Gradient transformation matrix.

See also

flash.display.Graphics.beginGradientFill()
ratiosproperty 
public var ratios:Array

Color distribution ratios corresponding to the elements in the colors Array.

See also

flash.display.Graphics.beginGradientFill()
spreadMethodproperty 
public var spreadMethod:String

Gradient spread method.

See also

flash.display.Graphics.beginGradientFill()
typeproperty 
public var type:String

A value from the GradientType class that specifies which gradient type to use: GradientType.LINEAR or GradientType.RADIAL.

See also

flash.display.Graphics.beginGradientFill()
Constructor detail
GradientStyle()constructor
public function GradientStyle(params:Object = null)

Constructs a new GradientStyle instance, optionally initializing it from an object.

Parameters
params:Object (default = null) — An initialization object that contains a set of initial values for the new GradientStyle object.

Example
   var mat:Matrix = new Matrix();
   mat.createGradientBox(10, 10, 0, 0, 0);
   var style:GradientStyle = new GradientStyle({
     type: GradientType.LINEAR,
     colors: [0xff0000, 0x00ff00, 0x0000ff],
     alphas: [0.3, 0.7, 0.5],
     ratios: [0, 64, 255],
     matrix: mat,
     spreadMethod: SpreadMethod.PAD,
     interpolationMethod: InterpolationMethod.RGB,
     focalPointRatio: 0.3
   });

Method detail
toString()method
public function toString():String

Returns a String representation of this object.

Returns
String — String representation of the style.