@mocanvas/editor · class
declare class Point2d extends Geometry2dA single point, with a margin that gives it something to be hit at.
This is the geometry of anything that has a position but no extent — a bare handle, an anchor, the origin of a shape that draws itself entirely from its props.
Methods · 8
constructor(config: Flags & {getBounds(): BoxgetSvgPathData(first?: boolean): stringgetVertices(): Vec[]hitTestLineSegment(A: VecLike, B: VecLike, margin?: number): booleanhitTestPoint(point: VecLike, margin?: number): booleannearestPoint(): VectoPathWords(): number[]Properties · 2
readonly margin: numberreadonly point: Vecmocanvas 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.