Speedy2D icon indicating copy to clipboard operation
Speedy2D copied to clipboard

Add support for stroke rects

Open blaumeise20 opened this issue 3 years ago • 2 comments

This would be really helpful for drawing borders around boxes.

g.draw_stroke_rect(rect, color, thickness);

blaumeise20 avatar Jan 21 '22 11:01 blaumeise20

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 :(

Revertron avatar Jan 22 '22 12:01 Revertron

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

dennisorlando avatar Mar 28 '23 13:03 dennisorlando