| Package | vegas.display |
| Class | public class PolyLineBackground |
| Inheritance | PolyLineBackground CoreSprite flash.display.Sprite |
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 ) ;
| Property | Defined 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 | ||
![]() | logger : 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 | ||
| Method | Defined 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 | ||
![]() | isLocked():Boolean
Returns true if the object is locked. | CoreSprite | |
![]() | lock():void
Locks the object. | CoreSprite | |
notifyResized():void
Notify an event when you resize the component. | PolyLineBackground | ||
![]() | resetLock():void
Reset the lock security of the display. | CoreSprite | |
![]() | unlock():void
Unlocks the display. | CoreSprite | |
update():void
Update the display. | PolyLineBackground | ||
viewChanged():void
This method is invoked after the draw() method in the update() method. | PolyLineBackground | ||
| data | property |
data:ArrayDeterminates 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.
public function get data():Array public function set data(value:Array):void| fill | property |
fill:IFillStyleDeterminates the IFillStyle reference of this display.
public function get fill():IFillStyle public function set fill(value:IFillStyle):void| gradientRotation | property |
public var gradientRotation:Number = 0The rotation value to draw the linearGradientFill method when draw the background.
| line | property |
line:ILineStyle
Determinates the ILineStyle reference of this display.
public function get line():ILineStyle public function set line(value:ILineStyle):void| useGradientBox | property |
public var useGradientBox:BooleanIndicates if the IFillStyle of this display use gradient box matrix (only if the IFillStyle is a FillGradientStyle).
| PolyLineBackground | () | Constructor |
public function PolyLineBackground(data:Array = null)Creates a new PolyLineBackground instance.
Parametersdata:Array (default = null) — An Array of all points to defines the polyline pen.
|
| draw | () | method |
public function draw(data:Array = null):voidDraw 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():PolyLinePenInit 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.
ReturnsPolyLinePen — the IPen reference to draw the background of the display.
|
| notifyResized | () | method |
public function notifyResized():voidNotify an event when you resize the component.
| update | () | method |
public function update():voidUpdate the display.
| viewChanged | () | method |
public function viewChanged():voidThis method is invoked after the draw() method in the update() method. Overrides this method.