Packagemx.graphics
Classpublic class LinearGradient
Implements IFill

The LinearGradient class lets you specify the fill of a graphical element, where a gradient specifies a gradual color transition in the fill color. You add a series of GradientEntry classes to the LinearGradient object's entries Array to define the colors that make up the gradient fill.

In MXML, you define a LinearGradient by adding a series of GradientEntry objects, as the following example shows:

You can also define a LinearGradient as a fill for any graphic element in ActionScript, as the following example shows:

MXML SyntaxexpandedHide MXML Syntax

The <mx:LinearGradient> tag inherits all the tag attributes of its superclass, and adds the following tag attributes:

  <mx:LinearGradient
    Properties
    angle="0"
  />
  

See also

mx.graphics.GradientEntry
mx.graphics.RadialGradient
mx.graphics.IFill


Public Properties
 PropertyDefined By
  angle : Number
Controls the transition direction.
LinearGradient
Public Methods
 MethodDefined By
  
Constructor.
LinearGradient
  
LinearGradient
  
end(target:Graphics):void
LinearGradient
Property Detail
angleproperty
angle:Number  [read-write]

Controls the transition direction. By default, the LinearGradient class defines a transition from left to right across the graphical element. A value of 180 causes the transition to occur from right to left.


Implementation
    public function get angle():Number
    public function set angle(value:Number):void
Constructor Detail
LinearGradient()Constructor
public function LinearGradient()

Constructor.

Method Detail
begin()method
public function begin(target:Graphics, rc:Rectangle):void

Parameters

target:Graphics — The target Graphics object that is being filled.
 
rc:Rectangle — The Rectangle object that defines the size of the fill inside the target. If the dimensions of the Rectangle are larger than the dimensions of the target, the fill is clipped. If the dimensions of the Rectangle are smaller than the dimensions of the target, the fill expands to fill the entire target.

end()method 
public function end(target:Graphics):void

Parameters

target:Graphics — The Graphics object that is being filled.





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/common/langref/mx/graphics/LinearGradient.html