Packagecom.yworks.canvas.geom
Interfacepublic interface IMutableControlPoints extends IControlPoints, Iterable
Implementors ArrayControlPoints, ControlPoints

An mutable collection of points.

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.



Public Properties
 PropertyDefined By
 Inheritedcount : uint
[read-only] Returns the number of elements in this collection.
IControlPoints
Public Methods
 MethodDefined By
  
add(index:uint, x:Number, y:Number):IPoint
Adds a point to the list at the given index using the provided coordinates.
IMutableControlPoints
  
clear():void
Removes all points from this list.
IMutableControlPoints
  
Returns a mutable view of one of the point in this list.
IMutableControlPoints
 Inherited
getPointAt(index:uint):IPoint
Returns the i-th point in the list.
IControlPoints
 Inherited
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
Method Detail
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.

Returns
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.

Returns
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.