Packagecom.yworks.yfiles.geom
Classpublic class YPointPath
InheritanceYPointPath Inheritance YObject Inheritance Object

This class represents an ordered list of points in the plane.



Public Properties
 PropertyDefined By
  first : YPoint
[read-only] Get the first point in the path.
YPointPath
  last : YPoint
[read-only] Get the last point in the path.
YPointPath
Public Methods
 MethodDefined By
  
YPointPath(init:Boolean = true)
Creates a new empty path.
YPointPath
  
Calculate the (geometric) length of the path.
YPointPath
  
Create a point path with reverse ordering of the points.
YPointPath
  
Get the points in the path.
YPointPath
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
YPointPath
  
Returns a line segment in the path.
YPointPath
 Inherited
hashCode():int
YObject
  
Get the points in the path.
YPointPath
  
length():int
Get the number of points in the path.
YPointPath
  
Get the number of line segments in the path.
YPointPath
  
Get the points in the path.
YPointPath
  
[static] Creates a new empty path.
YPointPath
  
[static] Creates a new path from a list of points.
YPointPath
  
newYPointPath3(path:Vector.<Object>):YPointPath
[static] Creates a new path from an array of points.
YPointPath
  
Get the points in the path.
YPointPath
  
toArray():Vector.<Object>
Get the points in the list as array.
YPointPath
  
Get the points in the path as list.
YPointPath
  
toString():String
YPointPath
Protected Methods
 MethodDefined By
  
Initializes this object.
YPointPath
  
Initializes this object.
YPointPath
  
initYPointPath3(path:Vector.<Object>):void
Initializes this object.
YPointPath
Public Constants
 ConstantDefined By
  EMPTY_PATH : YPointPath
[static] Defines a path with no points.
YPointPath
Property Detail
firstproperty
first:YPoint  [read-only]

Get the first point in the path.


Implementation
    public function get first():YPoint
lastproperty 
last:YPoint  [read-only]

Get the last point in the path.


Implementation
    public function get last():YPoint
Constructor Detail
YPointPath()Constructor
public function YPointPath(init:Boolean = true)

Creates a new empty path.

Parameters
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
calculateLength()method
public function calculateLength():Number

Calculate the (geometric) length of the path. The length of the path is the sum of lengths of all line segments making up the path.

Returns
Number — the (geometric) length of the path
createReverse()method 
public function createReverse():YPointPath

Create a point path with reverse ordering of the points.

Returns
YPointPath
cursor()method 
public function cursor():YCursor

Get the points in the path.

Returns
YCursor
getClass()method 
override public function getClass():Class

Returns
Class
getLineSegment()method 
public function getLineSegment(i:int):LineSegment

Returns a line segment in the path.

Parameters

i:int

Returns
LineSegment
initYPointPath1()method 
protected final function initYPointPath1():void

Initializes this object. See the documentation of the corresponding factory method newYPointPath1() for details.

See also

initYPointPath2()method 
protected final function initYPointPath2(l:List):void

Initializes this object. See the documentation of the corresponding factory method newYPointPath2() for details.

Parameters

l:List

See also

initYPointPath3()method 
protected final function initYPointPath3(path:Vector.<Object>):void

Initializes this object. See the documentation of the corresponding factory method newYPointPath3() for details.

Parameters

path:Vector.<Object>

See also

iterator()method 
public function iterator():Iterator

Get the points in the path.

Returns
Iterator
length()method 
public function length():int

Get the number of points in the path.

Returns
int
lineSegmentCount()method 
public function lineSegmentCount():int

Get the number of line segments in the path.

Returns
int
lineSegments()method 
public function lineSegments():YLineSegmentCursor

Get the points in the path.

Returns
YLineSegmentCursor
newYPointPath1()method 
public static function newYPointPath1():YPointPath

Creates a new empty path.

Returns
YPointPath
newYPointPath2()method 
public static function newYPointPath2(l:List):YPointPath

Creates a new path from a list of points.

Parameters

l:List — a list of com.yworks.yfiles.geom.YPoint instances.

Returns
YPointPath

See also

newYPointPath3()method 
public static function newYPointPath3(path:Vector.<Object>):YPointPath

Creates a new path from an array of points.

Parameters

path:Vector.<Object>

Returns
YPointPath
points()method 
public function points():YPointCursor

Get the points in the path.

Returns
YPointCursor
toArray()method 
public function toArray():Vector.<Object>

Get the points in the list as array.

Returns
Vector.<Object>
toList()method 
public function toList():List

Get the points in the path as list.

Returns
List — a list of com.yworks.yfiles.geom.YPoint instances.

See also

toString()method 
public function toString():String

Returns
String
Constant Detail
EMPTY_PATHConstant
public static const EMPTY_PATH:YPointPath

Defines a path with no points.