rough-stuff / rough

Create graphics with a hand-drawn, sketchy, appearance
http://roughjs.com
MIT License
19.88k stars 615 forks source link

support inside/outside strokes #204

Open dwelle opened 2 years ago

dwelle commented 2 years ago

Currently, strokes are centered in relation to the shape's outline, which results in two problems:

1) if the stroke has non-100% opacity, the stroke is visibly different when it covers a filled shape 2) when you want to create two elements, one with just a stroke and one with just a fill, they will be of different size (visually)

Figma gives you an option whether to make the stroke be inside, outside, or center:

image

Does it make sense for roughjs to support this as well?

Thinking about it, I would agree that for non-0 roughness (and 100% opacity), center stroke makes the most sense. For 0 roughness, inside is best, I think (which is why Figma and Miro defaults to it?).

Originally reported in https://github.com/excalidraw/excalidraw/issues/5084