File: ShapePath.md | Updated: 11/15/2025
This class is used to convert a series of paths to an array of shapes. It is specifically used in context of fonts and SVG.
Constructs a new shape path.
The color of the shape.
The current path that is being generated.
Default is null.
The paths that have been generated for this shape.
Default is null.
Adds an instance of CubicBezierCurve to the path by connecting the current point with the given one.
aCP1x | The x coordinate of the first control point.
---|---
aCP1y | The y coordinate of the first control point.
aCP2x | The x coordinate of the second control point.
aCP2y | The y coordinate of the second control point.
aX | The x coordinate of the end point.
aY | The y coordinate of the end point.
Returns: A reference to this shape path.
Adds an instance of LineCurve to the path by connecting the current point with the given one.
x | The x coordinate of the end point.
---|---
y | The y coordinate of the end point.
Returns: A reference to this shape path.
Creates a new path and moves it current point to the given one.
x | The x coordinate.
---|---
y | The y coordinate.
Returns: A reference to this shape path.
Adds an instance of QuadraticBezierCurve to the path by connecting the current point with the given one.
aCPx | The x coordinate of the control point.
---|---
aCPy | The y coordinate of the control point.
aX | The x coordinate of the end point.
aY | The y coordinate of the end point.
Returns: A reference to this shape path.
Adds an instance of SplineCurve to the path by connecting the current point with the given list of points.
pts | An array of points in 2D space.
---|---
Returns: A reference to this shape path.
Converts the paths into an array of shapes.
isCCW | By default solid shapes are defined clockwise (CW) and holes are defined counterclockwise (CCW). If this flag is set to true, then those are flipped.
---|---
Returns: An array of shapes.