Packagecom.flashdynamix.motion.vectors
Classpublic class Line
ImplementsIVector
SubclassesCurveLine

Defines a straight Line vector path to be drawn by a VectorLayer.



Public Properties
 PropertyDefined by
  length : int
[read-only]
Line
  pts : Array
A list of Points defining the path
Line
  style : Array
The style parameters to use when the line is drawn via the Graphics.lineStyle method.
Line
Public Methods
 MethodDefined by
  
Line(... pts)
Line
  
addAt(index:int, pt:Point):void
Adds a Point into the Line path at the specified index.
Line
  
draw(vector:Graphics, rect:Rectangle):void
Will draw the Line path into the Graphics instance provided.
Line
  
index(index:int):Point
Line
  
push(pt:Point):void
Pushes a Point into the Line path.
Line
  
remove(pt:Point):void
Removes a Point from the Line path.
Line
  
removeAt(index:int, count:int = 1):void
Removes one or more Points at the specified index and count from the Line path.
Line
  
unshift(pt:Point):void
Unshifts a Point from the Line path.
Line
Property detail
lengthproperty
length:int  [read-only]

Implementation
    public function get length():int
ptsproperty 
public var pts:Array

A list of Points defining the path

styleproperty 
public var style:Array

The style parameters to use when the line is drawn via the Graphics.lineStyle method.

Constructor detail
Line()constructor
public function Line(... pts)

Parameters
... pts — A list of Points defining the Line path.
Method detail
addAt()method
public function addAt(index:int, pt:Point):void

Adds a Point into the Line path at the specified index.

Parameters
index:int — The index at which to insert the Point.
 
pt:Point — The Point to insert at the index.
draw()method 
public function draw(vector:Graphics, rect:Rectangle):void

Will draw the Line path into the Graphics instance provided.

Parameters
vector:Graphics
 
rect:Rectangle
index()method 
public function index(index:int):Point

Parameters
index:int

Returns
Point — The Point at the specified index.
push()method 
public function push(pt:Point):void

Pushes a Point into the Line path.

Parameters
pt:Point — The Point which will be added to the end of the Line path.
remove()method 
public function remove(pt:Point):void

Removes a Point from the Line path.

Parameters
pt:Point — The Point you would like to remove from the Line path.
removeAt()method 
public function removeAt(index:int, count:int = 1):void

Removes one or more Points at the specified index and count from the Line path.

Parameters
index:int — The index to start removing nodes from the Line path.
 
count:int (default = 1) — the Number of nodes to remove from the Line path. If this is 0 no nodes are removed.
unshift()method 
public function unshift(pt:Point):void

Unshifts a Point from the Line path.

Parameters
pt:Point — The Point which will be unshifted to the Line path.