Pacotemx.graphics
Classepublic class LinearGradientStroke
HerançaLinearGradientStroke Inheritance GradientBase Inheritance EventDispatcher Inheritance Object
Implementa IStroke

The LinearGradientStroke class lets you specify a gradient filled stroke. You use the LinearGradientStroke class, along with the GradientEntry class, to define a gradient stroke.

Veja também

mx.graphics.Stroke
mx.graphics.GradientEntry
mx.graphics.RadialGradient
flash.display.Graphics


Propriedades Públicas
 PropriedadeDefinido por
  angle : Number
By default, the LinearGradientStroke defines a transition from left to right across the control.
LinearGradientStroke
  caps : String
A value from the CapsStyle class that specifies the type of caps at the end of lines.
LinearGradientStroke
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedentries : Array
An Array of GradientEntry objects defining the fill patterns for the gradient fill.
GradientBase
  interpolationMethod : String
A value from the InterpolationMethod class that specifies which interpolation method to use.
LinearGradientStroke
  joints : String
A value from the JointStyle class that specifies the type of joint appearance used at angles.
LinearGradientStroke
  miterLimit : Number
A number that indicates the limit at which a miter is cut off.
LinearGradientStroke
  pixelHinting : Boolean
A Boolean value that specifies whether to hint strokes to full pixels.
LinearGradientStroke
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  scaleMode : String
A value from the LineScaleMode class that specifies which scale mode to use.
LinearGradientStroke
  spreadMethod : String
A value from the SpreadMethod class that specifies which spread method to use.
LinearGradientStroke
  weight : Number
The line weight, in pixels.
LinearGradientStroke
Métodos Públicos
 MétodoDefinido por
  
LinearGradientStroke(weight:Number = 0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 0)
Constructor.
LinearGradientStroke
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
  
Applies the properties to the specified Graphics object.
LinearGradientStroke
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Eventos
 Evento Descrição Definido por
 Inherited Dispatched when Flash Player or the and AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited Dispatched when Flash Player loses operating system focus and is becoming inactive.EventDispatcher
Detalhes da propriedade
anglepropriedade
angle:Number  [read-write]

By default, the LinearGradientStroke defines a transition from left to right across the control. Use the angle property to control the transition direction. For exemplo, a value of 180.0 causes the transition to occur from right to left, rather than from left to right.

The default value is 0.0.


Implementação
    public function get angle():Number
    public function set angle(value:Number):void
capspropriedade 
caps:String  [read-write]

A value from the CapsStyle class that specifies the type of caps at the end of lines.

Valid values are CapsStyle.NONE, CapsStyle.ROUND, and CapsStyle.SQUARE. A null value is equivalent to CapsStyle.ROUND.

The default value is null.

This property can be used as the source for data binding.


Implementação
    public function get caps():String
    public function set caps(value:String):void
interpolationMethodpropriedade 
interpolationMethod:String  [read-write]

A value from the InterpolationMethod class that specifies which interpolation method to use.

Valid values are InterpolationMethod.LINEAR_RGB and InterpolationMethod.RGB.

The default value is InterpolationMethod.RGB.


Implementação
    public function get interpolationMethod():String
    public function set interpolationMethod(value:String):void
jointspropriedade 
joints:String  [read-write]

A value from the JointStyle class that specifies the type of joint appearance used at angles.

Valid values are JointStyle.BEVEL, JointStyle.MITER, and JointStyle.ROUND. A null value is equivalent to JoinStyle.ROUND.

The default value is null.

This property can be used as the source for data binding.


Implementação
    public function get joints():String
    public function set joints(value:String):void
miterLimitpropriedade 
miterLimit:Number  [read-write]

A number that indicates the limit at which a miter is cut off.

Valid values range from 0 to 255 (and values outside of that range are rounded to 0 or 255).

This value is only used if the jointStyle is set to JointStyle.MITER.

The miterLimit value represents the length that a miter can extend beyond the point at which the lines meet to form a joint. The value expresses a factor of the line thickness. For exemplo, with a miterLimit factor of 2.5 and a thickness of 10 pixels, the miter is cut off at 25 pixels.

The default value is 0.

This property can be used as the source for data binding.


Implementação
    public function get miterLimit():Number
    public function set miterLimit(value:Number):void
pixelHintingpropriedade 
pixelHinting:Boolean  [read-write]

A Boolean value that specifies whether to hint strokes to full pixels.

This affects both the position of anchors of a curve and the line stroke size itself.

With pixelHinting set to true, Flash Player hints line widths to full pixel widths. With pixelHinting set to false, disjoints can appear for curves and straight lines.

The default value is false.

This property can be used as the source for data binding.


Implementação
    public function get pixelHinting():Boolean
    public function set pixelHinting(value:Boolean):void
scaleModepropriedade 
scaleMode:String  [read-write]

A value from the LineScaleMode class that specifies which scale mode to use. Value valids are:

The default value is LineScaleMode.NORMAL.

This property can be used as the source for data binding.


Implementação
    public function get scaleMode():String
    public function set scaleMode(value:String):void
spreadMethodpropriedade 
spreadMethod:String  [read-write]

A value from the SpreadMethod class that specifies which spread method to use.

Value values are SpreadMethod.PAD, SpreadMethod.REFLECT, and SpreadMethod.REPEAT.

The default value is SpreadMethod.PAD.

This property can be used as the source for data binding.


Implementação
    public function get spreadMethod():String
    public function set spreadMethod(value:String):void
weightpropriedade 
weight:Number  [read-write]

The line weight, in pixels. For many charts, the default value is 1 pixel.

This property can be used as the source for data binding.


Implementação
    public function get weight():Number
    public function set weight(value:Number):void
Detalhes do construtor
LinearGradientStroke()Construtor
public function LinearGradientStroke(weight:Number = 0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 0)

Constructor.

Parâmetros
weight:Number (default = 0) — Specifies the line weight, in pixels. This parameter is optional, with a default value of 0.
 
pixelHinting:Boolean (default = false) — A Boolean value that specifies whether to hint strokes to full pixels. This affects both the position of anchors of a curve and the line stroke size itself. With pixelHinting set to true, Flash Player hints line widths to full pixel widths. With pixelHinting set to false, disjoints can appear for curves and straight lines. This parameter is optional, with a default value of false.
 
scaleMode:String (default = "normal") — A value from the LineScaleMode class that specifies which scale mode to use. Valid values are LineScaleMode.HORIZONTAL, LineScaleMode.NONE, LineScaleMode.NORMAL, and LineScaleMode.VERTICAL. This parameter is optional, with a default value of LineScaleMode.NORMAL.
 
caps:String (default = null) — A value from the CapsStyle class that specifies the type of caps at the end of lines. Valid values are CapsStyle.NONE, CapsStyle.ROUND, and CapsStyle.SQUARE. A null value is equivalent to CapsStyle.ROUND. This parameter is optional, with a default value of null.
 
joints:String (default = null) — A value from the JointStyle class that specifies the type of joint appearance used at angles. Valid values are JointStyle.BEVEL, JointStyle.MITER, and JointStyle.ROUND. A null value is equivalent to JoinStyle.ROUND. This parameter is optional, with a default value of null.
 
miterLimit:Number (default = 0) — A number that indicates the limit at which a miter is cut off. Valid values range from 1 to 255 (and values outside of that range are rounded to 1 or 255). This value is only used if the jointStyle property is set to miter. The miterLimit value represents the length that a miter can extend beyond the point at which the lines meet to form a joint. The value expresses a factor of the line thickness. For exemplo, with a miterLimit factor of 2.5 and a thickness of 10 pixels, the miter is cut off at 25 pixels. This parameter is optional, with a default value of 0.
Detalhes do método
apply()método
public function apply(g:Graphics):void

Applies the properties to the specified Graphics object.

Parâmetros

g:Graphics — The Graphics object to which the LinearGradientStroke styles are applied.