Package | com.yworks.canvas.geom |
Class | public class ControlPoints |
Inheritance | ControlPoints Object |
Implements | IControlPoints, IMutableControlPoints |
IControlPoints
Property | Defined By | ||
---|---|---|---|
count : uint [read-only]
Returns the number of elements in this collection. | ControlPoints |
Method | Defined By | ||
---|---|---|---|
ControlPoints(initialCapacity:int = 0)
Creates a new ControlPoints instance with an initial capacity
| ControlPoints | ||
Adds a point to the list at the given index using the provided coordinates. | ControlPoints | ||
clear():void
Removes all points from this list. | ControlPoints | ||
getMutablePoint(index:uint):IMutablePoint
Returns a mutable view of one of the point in this list. | ControlPoints | ||
getPointAt(index:uint):IPoint
Returns the i-th point in the list. | ControlPoints | ||
Returns an iterator over a set of elements. | ControlPoints | ||
Adds the point to the end of the list. | ControlPoints | ||
remove(index:uint):void
Removes the point at the given index. | ControlPoints | ||
setLocation(index:uint, x:Number, y:Number):void
Sets the coordinates of a point in the list. | ControlPoints |
count | property |
count:uint
[read-only] Returns the number of elements in this collection.
public function get count():uint
ControlPoints | () | Constructor |
public function ControlPoints(initialCapacity:int = 0)
Creates a new ControlPoints
instance with an initial capacity
initialCapacity:int (default = 0 ) — the initial capacity of this instance
|
add | () | method |
public function add(index:uint, x:Number, y:Number):IPoint
Adds a point to the list at the given index using the provided coordinates.
Parameters
index:uint — The index the point should be insterted at.
| |
x:Number — The x coordinate of the newly created point.
| |
y:Number — The y coordinate of the newly created point.
|
IPoint — The point created.
|
clear | () | method |
public function clear():void
Removes all points from this list.
getMutablePoint | () | method |
public function getMutablePoint(index:uint):IMutablePoint
Returns a mutable view of one of the point in this list.
Parameters
index:uint — The index of the point to return.
|
IMutablePoint — A IMutablePoint view of the point in the list.
|
getPointAt | () | method |
public function getPointAt(index:uint):IPoint
Returns the i-th point in the list.
Parameters
index:uint — The zero-based index of the item in this list
|
IPoint — The item for the given index
|
iterator | () | method |
public function iterator():Iterator
Returns an iterator over a set of elements.
ReturnsIterator — an Iterator.
|
push | () | method |
remove | () | method |
public function remove(index:uint):void
Removes the point at the given index.
Parameters
index:uint — The index of the point to remove.
|
setLocation | () | method |
public function setLocation(index:uint, x:Number, y:Number):void
Sets the coordinates of a point in the list.
Parameters
index:uint — The index of the point to set the coordinates.
| |
x:Number — The new x coordinate.
| |
y:Number — The new y coordinate.
|