Packagesekati.draw
Classpublic class GradientRect
InheritanceGradientRect Inheritance flash.display.Shape
ImplementsITweenableDrawing

GradientRect provides a gradient rectangle shape.

Note: This class does not implement ITweenableDrawing and functions differently than Rect and other draw package classes.



Public Properties
 PropertyDefined by
  alphas : Array
The gradient alpha array.
GradientRect
  colors : Array
The gradient color array.
GradientRect
  focalPointRatio : Number
The gradient focal point ratio.
GradientRect
  interpolation : String
The gradient interpolation method.
GradientRect
  isVerticalGradient : Boolean
Determines whether the gradient is vertical, true or horizontal, false.
GradientRect
  matrix : Matrix
The gradient matrix.
GradientRect
  ratios : Array
The gradient ratio array.
GradientRect
  spread : String
The gradient spread method.
GradientRect
  type : String
The gradient type
GradientRect
Protected Properties
 PropertyDefined by
  _alphas : Array
GradientRect
  _colors : Array
GradientRect
  _focalPointRatio : Number
GradientRect
  _height : Number
GradientRect
  _interpolation : String
GradientRect
  _isVerticalGradient : Boolean
GradientRect
  _matrix : Matrix
GradientRect
  _ratios : Array
GradientRect
  _spread : String
GradientRect
  _type : String
GradientRect
  _width : Number
GradientRect
Public Methods
 MethodDefined by
  
GradientRect(width:Number, height:Number, colors:Array, alphas:Array, ratios:Array, isVerticalGradient:Boolean = true, type:String = "linear", spread:String = "pad", interpolation:String = "rgb", focalPointRatio:Number = 0)
GradientRect Constructor
GradientRect
  
clear():void
Clear the drawn graphics Shape.
GradientRect
  
draw():void
Draw in to the graphics Shape.
GradientRect
  
redraw():void
Clear & draw in to the graphics Shape.
GradientRect
Property detail
_alphasproperty
protected var _alphas:Array
alphasproperty 
alphas:Array  [read-write]

The gradient alpha array.

Implementation
    public function get alphas():Array
    public function set alphas(value:Array):void
_colorsproperty 
protected var _colors:Array
colorsproperty 
colors:Array  [read-write]

The gradient color array.

Implementation
    public function get colors():Array
    public function set colors(value:Array):void
_focalPointRatioproperty 
protected var _focalPointRatio:Number
focalPointRatioproperty 
focalPointRatio:Number  [read-write]

The gradient focal point ratio.

Implementation
    public function get focalPointRatio():Number
    public function set focalPointRatio(value:Number):void
_heightproperty 
protected var _height:Number
_interpolationproperty 
protected var _interpolation:String
interpolationproperty 
interpolation:String  [read-write]

The gradient interpolation method.

Implementation
    public function get interpolation():String
    public function set interpolation(value:String):void

See also

flash.display.InterpolationMethod
_isVerticalGradientproperty 
protected var _isVerticalGradient:Boolean
isVerticalGradientproperty 
isVerticalGradient:Boolean  [read-write]

Determines whether the gradient is vertical, true or horizontal, false.

Implementation
    public function get isVerticalGradient():Boolean
    public function set isVerticalGradient(value:Boolean):void
_matrixproperty 
protected var _matrix:Matrix
matrixproperty 
matrix:Matrix  [read-write]

The gradient matrix.

Implementation
    public function get matrix():Matrix
    public function set matrix(value:Matrix):void

See also

flash.geom.Matrix
_ratiosproperty 
protected var _ratios:Array
ratiosproperty 
ratios:Array  [read-write]

The gradient ratio array.

Implementation
    public function get ratios():Array
    public function set ratios(value:Array):void
_spreadproperty 
protected var _spread:String
spreadproperty 
spread:String  [read-write]

The gradient spread method.

Implementation
    public function get spread():String
    public function set spread(value:String):void

See also

flash.display.SpreadMethod
_typeproperty 
protected var _type:String
typeproperty 
type:String  [read-write]

The gradient type

Implementation
    public function get type():String
    public function set type(value:String):void

See also

flash.display.GradientType
_widthproperty 
protected var _width:Number
Constructor detail
GradientRect()constructor
public function GradientRect(width:Number, height:Number, colors:Array, alphas:Array, ratios:Array, isVerticalGradient:Boolean = true, type:String = "linear", spread:String = "pad", interpolation:String = "rgb", focalPointRatio:Number = 0)

GradientRect Constructor

Parameters
width:Number
 
height:Number
 
colors:Array
 
alphas:Array
 
ratios:Array
 
isVerticalGradient:Boolean (default = true)
 
type:String (default = "linear")
 
spread:String (default = "pad")
 
interpolation:String (default = "rgb")
 
focalPointRatio:Number (default = 0)

Example
   var rect : GradientRect = new GradientRect( 320, 240, [ 0xffcc00, 0xff00ff ], [ 1, 0.75 ], [ 0, 255 ] );
   addChild( rect );
   

Method detail
clear()method
public function clear():void

Clear the drawn graphics Shape.

draw()method 
public function draw():void

Draw in to the graphics Shape.

redraw()method 
public function redraw():void

Clear & draw in to the graphics Shape.