Closed Sophist-UK closed 2 years ago
Ready for review.
In certain edge cases [sic.] e.g. flat end-caps, this can result in a stroke bounding box being slightly too big.
However this fix is intended to be used during rendering, because rendering to an image sized using centre line can (and does) result in rendering being incorrectly clipped. Using a bounding box slightly too large for rendering purposes will not have this problem.
Hm. I thought this might be gaudy but it's apparently pretty straight forward and kind of elegant. You could code in some test cases and save me the trouble if not sometime late tomorrow.
Happy to code in some test cases - but I am away for 3 days so it will have to wait until I am back.
I'll likely get to them before that point.
Optionally including the stroke-width in the bbox. Default remains to use the centreline of the stroke.