@mocanvas/mocanvas · class
declare class PathBuilderGeometry2d extends Geometry2dOne run of a path, as a Geometry2d the editor can hit-test, snap to and export.
Methods · 5
constructor(path: PathBuilder, startIdx: number, endIdx: number, options: Geometry2dOptions)getSegments(): Geometry2d[]This run split into one geometry per segment.
The unit an arrow terminal or a handle is placed against: a caller that wants "the third edge of the shape" wants a segment, not the whole run.
getSvgPathData(first?: boolean): stringgetVertices(_filters?: Geometry2dFilters): Vec[]toPathWords(): number[]Properties · 3
readonly endIdx: numberreadonly path: PathBuilderreadonly startIdx: numberMentioned here
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.