Packagevegas.display
Classpublic class PolyLineBackground
InheritancePolyLineBackground Inheritance CoreSprite Inheritance flash.display.Sprite

This background use a PolyLine pen to draw this visual shape.

Example :

     import vegas.display.PolyLineBackground ;
     
     import vegas.FillStyle ;
     import vegas.LineStyle ;
     
     stage.align = "tl" ;
     stage.scaleMode = "noScale" ;
     
     var bg:PolyLineBackground = new PolyLineBackground() ;
     
     bg.x = 25 ;
     bg.y = 25 ;
     
     var data:Array =
     [
         {x :  10 , y :  10 } ,
         {x : 110 , y :  10 } ,
         {x : 110 , y :  45 } ,
         {x : 120 , y :  55 } ,
         {x : 110 , y :  65 } ,
         {x : 110 , y : 110 } ,
         {x :  10 , y : 110 } 
     ] ;
     
     bg.fill = new FillStyle( 0xFF0000 ) ;
     bg.line = new LineStyle( 2, 0xFFFFFF ) ;
     bg.data = data ;
     
     addChild( bg ) ;
     



Public Properties
 PropertyDefined By
  data : Array
Determinates the array representation of all points of this polyline pen.
PolyLineBackground
  fill : IFillStyle
Determinates the IFillStyle reference of this display.
PolyLineBackground
  gradientRotation : Number = 0
The rotation value to draw the linearGradientFill method when draw the background.
PolyLineBackground
  line : ILineStyle
Determinates the ILineStyle reference of this display.
PolyLineBackground
 Inheritedlogger : Logger
Determinates the internal ILogger reference of this Logable object.
CoreSprite
  useGradientBox : Boolean
Indicates if the IFillStyle of this display use gradient box matrix (only if the IFillStyle is a FillGradientStyle).
PolyLineBackground
Public Methods
 MethodDefined By
  
PolyLineBackground(data:Array = null)
Creates a new PolyLineBackground instance.
PolyLineBackground
  
draw(data:Array = null):void
Draw the display.
PolyLineBackground
  
Init the pen to draw the background of this display.
PolyLineBackground
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreSprite
 Inherited
lock():void
Locks the object.
CoreSprite
  
Notify an event when you resize the component.
PolyLineBackground
 Inherited
resetLock():void
Reset the lock security of the display.
CoreSprite
 Inherited
unlock():void
Unlocks the display.
CoreSprite
  
update():void
Update the display.
PolyLineBackground
  
This method is invoked after the draw() method in the update() method.
PolyLineBackground
Protected Methods
 MethodDefined By
 Inherited
addedToStage(e:Event = null):void
Invoked when the display is added to the stage.
CoreSprite
 Inherited
removedFromStage(e:Event = null):void
Invoked when the display is removed from the stage.
CoreSprite
Property Detail
dataproperty
data:Array

Determinates the array representation of all points of this polyline pen.

This Array can contains graphics.geom.Vector2, flash.geom.Point or all objects with a numeric x an y properties.


Implementation
    public function get data():Array
    public function set data(value:Array):void
fillproperty 
fill:IFillStyle

Determinates the IFillStyle reference of this display.


Implementation
    public function get fill():IFillStyle
    public function set fill(value:IFillStyle):void
gradientRotationproperty 
public var gradientRotation:Number = 0

The rotation value to draw the linearGradientFill method when draw the background.

lineproperty 
line:ILineStyle

Determinates the ILineStyle reference of this display.


Implementation
    public function get line():ILineStyle
    public function set line(value:ILineStyle):void
useGradientBoxproperty 
public var useGradientBox:Boolean

Indicates if the IFillStyle of this display use gradient box matrix (only if the IFillStyle is a FillGradientStyle).

Constructor Detail
PolyLineBackground()Constructor
public function PolyLineBackground(data:Array = null)

Creates a new PolyLineBackground instance.

Parameters
data:Array (default = null) — An Array of all points to defines the polyline pen.
Method Detail
draw()method
public function draw(data:Array = null):void

Draw the display.

Parameters

data:Array (default = null) — The optional Array of points to draw the polyline shape of the background.

initBackgroundPen()method 
public function initBackgroundPen():PolyLinePen

Init the pen to draw the background of this display. This method is invoked in the constructor of the class. You can override this method to change the shape of the background.

Returns
PolyLinePen — the IPen reference to draw the background of the display.
notifyResized()method 
public function notifyResized():void

Notify an event when you resize the component.

update()method 
public function update():void

Update the display.

viewChanged()method 
public function viewChanged():void

This method is invoked after the draw() method in the update() method. Overrides this method.