@mocanvas/mocanvas · class

DrawShapeUtil

declare class DrawShapeUtil extends ShapeUtil<DrawShape, DrawShapeUtilDisplayValues>

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Methods · 9

canResize(_shape: DrawShape): boolean
component(_shape: DrawShape): ReactNode
getDefaultProps(): DrawShapeProps
getEngineGeometry(shape: DrawShape): EngineGeometry

Freehand smoothing runs in the engine: the raw segment points go across and the outline is built there. w/h are the extents of the *unsmoothed* points — the smoothed outline can only sit inside them, and this util sets neither OVERLAY nor LABEL, so those words feed a fallback the engine never reaches once the geometry command has run.

getGeometry(shape: DrawShape): Geometry2d
getIndicatorPath(shape: DrawShape): Path2D
getRenderStyle(shape: DrawShape): StyleWords
hideResizeHandles(_shape: DrawShape): boolean
onResize(shape: DrawShape, info: ResizeInfo<DrawShape>): Partial<DrawShape>

Properties · 5

static migrations: _mocanvas_editor.PropsMigrations
static options: DrawShapeOptions
readonly options: DrawShapeOptions
static props: _mocanvas_editor.RecordProps<DrawShape>
static type: "draw"

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.