@mocanvas/editor · class
declare class TransformedGeometry2d extends Geometry2dAnother geometry seen through an affine transform.
Every query is answered by mapping the question into the source geometry's own space, asking it there, and mapping the answer back — so a transformed geometry costs one matrix inversion rather than a rebuilt outline, and stays exact for anything the source answers exactly.
Methods · 8
constructor(geometry: Geometry2d, matrix: MatModel, opts?: TransformedGeometry2dOptions)distanceToPoint(point: VecLike, hitInside?: boolean, filters?: Geometry2dFilters): numbergetBoundsVertices(): Vec[]getVertices(filters?: Geometry2dFilters): Vec[]hitTestPoint(point: VecLike, margin?: number, hitInside?: boolean, filters?: Geometry2dFilters): booleanignoreHit(point: VecLike): booleannearestPoint(point: VecLike, filters?: Geometry2dFilters): VectoPathWords(): number[]Properties · 2
readonly geometry: Geometry2dreadonly matrix: Matmocanvas 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.