RoundedRectangle
dennisorlando opened this issue · comments
Would it be ok if I wrote a RoundedRectangle struct parallel to the normal Rectangle?
I would draw it by drawing 2 rectangles in a "cross" and then 4 circles in the corner
It would be better to have a function to draw rounded rectangle without filling with color.
I'm happy for this to be added :) The most efficient way to draw it is to:
- Use three rectangles instead of two, to avoid unnecessarily drawing the overlapping area
- Similarly, with the four circles, it's only necessary to draw a quarter of each one -- this can be done using
draw_circle_section_triangular_three_color()
twice for each corner
It would be better to have a function to draw rounded rectangle without filling with color.
Yeah, this would also be good to add at some point. I think it would need changes to the shader though (so that circles have an "inner" radius in addition to the "outer" radius).
Ok, working on it