@mocanvas/mocanvas · function
declare function getGeoDecorations(kind: GeoShapeKind, w: number, h: number, strokeWidth?: number): VecLike[][]Open polylines drawn inside the outline (the X of an x-box, the tick of a check-box).
strokeWidth shortens the marks that end *on* the outline. A stroke is
centred on its path and its round cap reaches half a width beyond the last
point, so diagonals running corner to corner of the box came out as four
spikes sticking through the very outline they belong inside. Pulling each end
back by half a width lands the cap on the corner instead of past it. The
check-box's tick sits well clear of the edge and is left alone.
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.