@mocanvas/mocanvas · function

shapeToBackgroundSvg

declare function shapeToBackgroundSvg(editor: Editor, shape: UnknownShape, ctx: SvgExportContext): string | undefined

A shape's backdrop in shape-local space, drawn behind *every* exported shape. Only ShapeUtil.toBackgroundSvg produces one; there is no registry behind it and no geometry fallback, because a shape that says nothing here wants nothing drawn.

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.