@mocanvas/editor · interface

PerfectDashOptions

interface PerfectDashOptions

Options for getPerfectDashProps.


Properties · 7

closed?: boolean

Whether the path is closed, in which case both terminals are ignored.

end?: PerfectDashTerminal

How it meets the end.

forceSolid?: boolean

Return a solid stroke regardless of style — for a zoom level where dashes are noise.

lengthRatio?: number

Dash length as a multiple of the stroke width. Defaults to 4 dashed, 100 dotted.

snap?: number

Snap the dash count to a multiple of this. 4 keeps a closed shape symmetric.

start?: PerfectDashTerminal

How the pattern meets the start of an open path.

style?: "solid" | "dashed" | "dotted" | "draw" | (string & {})

The dash style being drawn. Anything but dashed/dotted returns a solid stroke.

Mentioned here

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.