(private) new xrx.shape.PathLike(drawing, geometry)
An abstract class representing a path-like shape
such as a polygon or poly-line.
Parameters:
Name | Type | Description |
---|---|---|
drawing |
xrx.drawing.Drawing | The parent drawing canvas. |
geometry |
xrx.geometry.Geometry | A geometry object. |
Methods
-
(private) xrx.shape.PathLike#appendCoord(coord)
-
Appends a new coordinate to this path-like shape.
Parameters:
Name Type Description coord
Array.<number> The new coordinate. -
xrx.shape.PathLike#disposeInternal()
-
Disposes this path-like shape.
-
xrx.shape.PathLike#getCoords() → {Array.<number>}
-
Returns the coordinates of this path-like shape.
Returns:
The coordinates.- Type
- Array.<number>
-
(private) xrx.shape.PathLike#setCoordAt(pos, coord)
-
Updates one coordinate in the list of coordinates.
Parameters:
Name Type Description pos
number Index of the coordinate to be updated. coord
Array.<number> The new coordinate. -
xrx.shape.PathLike#setCoords(coords)
-
Sets the coordinates for this path-like shape.
Parameters:
Name Type Description coords
Array.<number> The coordinates. -
(private) xrx.shape.PathLike#setCoordXAt(pos, x)
-
Updates one x coordinate in the list of coordinates.
Parameters:
Name Type Description pos
number Index of the x coordinate to be updated. x
number The new x coordinate. -
(private) xrx.shape.PathLike#setCoordYAt(pos, y)
-
Updates one y coordinate in the list of coordinates.
Parameters:
Name Type Description pos
number Index of the y coordinate to be updated. y
number The new y coordinate. -
(private) xrx.shape.PathLike#setLastCoord(coord)
-
Updates the last coordinate of this path-like shape.
Parameters:
Name Type Description coord
Array.<number> The new coordinate.