@mocanvas/mocanvas · interface

DrawShapeUtilDisplayValues

interface DrawShapeUtilDisplayValues extends TLDefaultDisplayValues

What a draw shape paints with.

A draw shape carries its own scale, which the shared set knows nothing about: strokeWidth on the base is the width the *style* asks for, and DrawShapeUtilDisplayValues.scaledStrokeWidth is the width actually drawn. Both are reported rather than one overwriting the other, so a caller comparing two shapes' styles and a caller measuring one shape's ink each get the number they meant.


Properties · 2

isFilled: boolean

Whether the outline is actually filled: it must be closed *and* have a fill style.

scaledStrokeWidth: number

strokeWidth with the shape's own scale applied.

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.