| Package | graphics.drawing |
| Class | public dynamic class PolyLinePen |
| Inheritance | PolyLinePen Pen flash.utils.Proxy |
Example :
import flash.geom.Point ;
import graphics.FillStyle ;
import graphics.drawing.PolyLinePen ;
import graphics.geom.Vector2 ;
stage.align = "tl" ;
stage.scaleMode = "noScale" ;
var shape:Shape = new Shape() ;
shape.x = 0 ;
shape.y = 0 ;
addChild( shape ) ;
var data:Array =
[
new Vector2(10,10), new Vector2(110,10), new Point(110,110), {x:10,y:110}
] ;
var pen:PolyLinePen = new PolyLinePen( shape , data ) ;
pen.fill = new FillStyle( 0xFF0000 ) ;
pen.draw() ;
| Property | Defined By | ||
|---|---|---|---|
![]() | align : uint
Determinates the align value of the pen. | Pen | |
| data : Array
Determinates the array representation of all points of this polyline pen. | PolyLinePen | ||
![]() | fill : IFillStyle
Determinates the fill style object of the pen. | Pen | |
![]() | graphics : *
Specifies the Graphics object belonging to this Shape object, where vector drawing commands can occur. | Pen | |
![]() | line : ILineStyle
Determinates the line style object of the pen. | Pen | |
![]() | useClear : Boolean = true
Indicates if the clear() method is invoked at the end of the draw method. | Pen | |
| useClose : Boolean = true
Indicates if the polyline is automatically closed. | PolyLinePen | ||
![]() | useEndFill : Boolean = true
Indicates if the endFill() method is invoked at the end of the draw method. | Pen | |
| useFirst : Boolean = true
Indicates if first point in the data model is the first offset position, the x and y value of this pen change and use the value of this point. | PolyLinePen | ||
| x : Number
Defines the x position of the shape rectangle. | PolyLinePen | ||
| y : Number
Defines the y position of the shape rectangle. | PolyLinePen | ||
| Method | Defined By | ||
|---|---|---|---|
PolyLinePen(graphic:*, data:Array = null)
Creates a new PolyLinePen instance. | PolyLinePen | ||
![]() | BF(... arguments):void
Defines a shortcut reference to used the beginBitmapFill method. | Pen | |
![]() | C(... arguments):void
Defines a shortcut reference to used the curveTo method. | Pen | |
![]() | CL():void
Defines a shortcut reference to used the clear method. | Pen | |
draw(... args):void [override]
Draws the shape. | PolyLinePen | ||
drawShape():void [override]
This method contains the basic drawing shape algorithm. | PolyLinePen | ||
![]() | EF():void
Defines a shortcut reference to used the endFill method. | Pen | |
![]() | F(... arguments):void
Defines a shortcut reference to used the beginFill method. | Pen | |
![]() | GF(... arguments):void
Defines a shortcut reference to used the beginGradientFill method. | Pen | |
![]() | GS(... arguments):void
Defines a shortcut reference to used the lineGradientStyle method. | Pen | |
![]() | L(... arguments):void
Defines a shortcut reference to used the lineTo method. | Pen | |
![]() | M(... arguments):void
Defines a shortcut reference to used the moveTo method. | Pen | |
![]() | S(... arguments):void
Defines a shortcut reference to used the lineStyle method. | Pen | |
size():Number
Returns the number of elements in the model. | PolyLinePen | ||
| 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| useClose | property |
public var useClose:Boolean = trueIndicates if the polyline is automatically closed.
| useFirst | property |
public var useFirst:Boolean = trueIndicates if first point in the data model is the first offset position, the x and y value of this pen change and use the value of this point.
| x | property |
public var x:NumberDefines the x position of the shape rectangle.
| y | property |
public var y:NumberDefines the y position of the shape rectangle.
| PolyLinePen | () | Constructor |
public function PolyLinePen(graphic:*, data:Array = null)Creates a new PolyLinePen instance.
Parametersgraphic:* — The Graphics reference to control with this helper. You can passed-in a Shape or Sprite/MovieClip reference in argument.
| |
data:Array (default = null) — The array representation of the model of this polyline
|
| draw | () | method |
override public function draw(... args):voidDraws the shape.
Parameters
... args — The array representation of all vectors or points to draw the shape.
|
| drawShape | () | method |
override public function drawShape():voidThis method contains the basic drawing shape algorithm.
| size | () | method |
public function size():NumberReturns the number of elements in the model.
ReturnsNumber — the number of elements in the model.
|