Class Path

A sequence of integer-valued points representing a single contour (see also terminology).

Paths may be open and represent a series of line segments bounded by 2 or more vertices, or they may be closed and represent polygons. Whether or not a path is open depends on context. Closed paths may be 'outer' contours or 'hole' contours. Which they are depends on orientation.

Multiple paths can be grouped into a Paths structure.

See also:

Methods

Path:AddPoint (x, y)
Add a point to the end of the path.

Parameters:

  • x cInt Point's x-coordinate...
  • y cInt ...and y.
Path:Clear ()
Remove all points from the path.
Path:GetPoint (index)

Parameters:

  • index uint Index of point, from 1 to #self.

Returns:

  1. cInt x Point's x-coordinate...
  2. cInt y ...and y.

Metamethods

Path:__concat ()
Concatenate two or more Paths into an array, e.g. local array = path1 .. path2 .. path3.

Returns:

    Paths Result of the concatenation.
Path:__len ()

Returns:

    uint Number of points in path.
Path:__tostring ()

Returns:

    string String representation of the path.
generated by LDoc 1.4.6 Last updated 2018-08-13 18:06:38