dashed-border-generator icon indicating copy to clipboard operation
dashed-border-generator copied to clipboard

Half of stroke width gets cut off

Open andrewbaxter opened this issue 8 months ago • 1 comments

I think this is probably what https://github.com/kovart/dashed-border-generator/issues/1 was referring to

If the svg width/height are 100 and the figure width/height 100 and the stroke width is 10 that means the drawn area of the figure goes from -5 to 105 and 5 gets cut off on each side. Either the figure should be reduced and shifted by 1/2 the stroke width or the svg viewport should be adjusted to go from -5 to 105.

andrewbaxter avatar Apr 01 '25 06:04 andrewbaxter

Ah, you can see this if you set the end cap to rounded, you only get half of the dash.

Actually TBH my analysis might be wrong - adding border rounding doesn't show the other half at the corners so maybe it's not getting clipped by the viewport. #1 may have been more on point, something about stroke order.

andrewbaxter avatar Apr 01 '25 06:04 andrewbaxter