image icon indicating copy to clipboard operation
image copied to clipboard

roundedCorners support in drawPolygon

Open ekuleshov opened this issue 1 year ago • 2 comments

Here is an interesting algorithm for drawing polygons with rounded corners that can be implemented without Bezier curves.

https://gorillasun.de/blog/an-algorithm-for-polygons-with-rounded-corners https://stackoverflow.com/a/44856925

image

ekuleshov avatar Jan 09 '23 22:01 ekuleshov

That's interesting. Though I think cubic splines might have more control (without having looked at that article too close). I started writing a Path class with lines and cubic splines implemented for outline drawing so far, but then work started up again and I have pick away at it a bit more slowly now.

brendan-duncan avatar Jan 09 '23 22:01 brendan-duncan

Right. At the end of the linked article and in SO answers there is a variant based on Bezier curve too

ekuleshov avatar Jan 09 '23 22:01 ekuleshov