Module GraphicsPathCommand

GraphicsPathCommand helper methods

Functions

moveTo (x, y) Move the path cursor to a destination coordinate
lineTo (x, y) Draw a line from the path cursor to a destination coordinate, and move the path cursor with it.
curveTo (cx, cy, x, y) Draw a quadratic bezier curve from the path cursor to a destination coordinate, curving towards the control point, and move the path cursor with it.
cubicCurveTo (cx1, cy1, cx2, cy2, x, y) Draw a cubic bezier curve from the path cursor to a destination coordinate, curving towards the control points, and move the path cursor with it.
toString () Returns a string suitable for use with the sprite drawPath() function.


Functions

moveTo (x, y)
Move the path cursor to a destination coordinate

Parameters:

  • x number The x coordinate to move to.
  • y number The y coordinate to move to.
lineTo (x, y)
Draw a line from the path cursor to a destination coordinate, and move the path cursor with it.

Parameters:

  • x number The x coordinate to move to.
  • y number The y coordinate to move to.
curveTo (cx, cy, x, y)
Draw a quadratic bezier curve from the path cursor to a destination coordinate, curving towards the control point, and move the path cursor with it.

Parameters:

  • cx number The x coordinate of the control point
  • cy number The y coordinate of the control point.
  • x number The x coordinate to move to.
  • y number The y coordinate to move to.
cubicCurveTo (cx1, cy1, cx2, cy2, x, y)
Draw a cubic bezier curve from the path cursor to a destination coordinate, curving towards the control points, and move the path cursor with it.

Parameters:

  • cx1 number The x coordinate of the first control point
  • cy1 number The y coordinate of the first control point.
  • cx2 number The x coordinate of the second control point
  • cy2 number The y coordinate of the second control point.
  • x number The x coordinate to move to.
  • y number The y coordinate to move to.
toString ()
Returns a string suitable for use with the sprite drawPath() function.

Returns:

    string A command string, usable with the drawPath sprite function.

See also:

generated by LDoc 1.5.0 Last updated 2025-12-17 05:13:02