Class: xrx.shape.PathLike

xrx.shape. PathLike

(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.
Source:

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.
Source:

xrx.shape.PathLike#disposeInternal()

Disposes this path-like shape.
Source:

xrx.shape.PathLike#getCoords() → {Array.<number>}

Returns the coordinates of this path-like shape.
Source:
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.
Source:

xrx.shape.PathLike#setCoords(coords)

Sets the coordinates for this path-like shape.
Parameters:
Name Type Description
coords Array.<number> The coordinates.
Source:

(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.
Source:

(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.
Source:

(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.
Source: