Speedy2D
Speedy2D copied to clipboard
Add support for stroke rects
This would be really helpful for drawing borders around boxes.
g.draw_stroke_rect(rect, color, thickness);
Usually it is done in the other way. To draw just rectangle without filling method usually is named draw_rect(...)
and to draw rect with filled area fill_rect(...)
, but it will change API :(
Hmm what about drawing two rectangles (one slightly bigger than the other in order to create the border) ? It might not work when working with opacity and transparent textures tho
Another solution would be to implement a "draw_stroke_rect" as 4 lines connected to each other