Package | com.yworks.canvas.geom |
Interface | public interface IMutableControlPoints extends IControlPoints, Iterable |
Implementors | ArrayControlPoints, ControlPoints |
This interface allows for adding and removing points to or from the collection, as well as setting the location of a point in the list.
Method | Defined By | ||
---|---|---|---|
Adds a point to the list at the given index using the provided coordinates. | IMutableControlPoints | ||
clear():void
Removes all points from this list. | IMutableControlPoints | ||
getMutablePoint(index:uint):IMutablePoint
Returns a mutable view of one of the point in this list. | IMutableControlPoints | ||
getPointAt(index:uint):IPoint
Returns the i-th point in the list. | IControlPoints | ||
Returns an iterator over a set of elements. | Iterable | ||
remove(index:uint):void
Removes the point at the given index. | IMutableControlPoints | ||
setLocation(index:uint, x:Number, y:Number):void
Sets the coordinates of a point in the list. | IMutableControlPoints |
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.
|
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.
|