@mocanvas/editor · function

strokeShapeIndicators

declare function strokeShapeIndicators(ctx: CanvasRenderingContext2D, editor: Editor, shapes: readonly UnknownShape[], options?: StrokeShapeIndicatorsOptions): void

Stroke the indicator outline of each shape onto ctx.

The context is expected to already be in **page space** — the caller has applied the camera — so this only applies each shape's own page transform. Doing it the other way round would mean re-deriving the camera per shape.

Shapes still on the deprecated React indicator() hook are skipped rather than approximated: their outline is drawn by the SVG layer, and drawing a bounds rectangle here as well would double every one of them.

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.