Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for stroke rects #54

Open
blaumeise20 opened this issue Jan 21, 2022 · 2 comments
Open

Add support for stroke rects #54

blaumeise20 opened this issue Jan 21, 2022 · 2 comments

Comments

@blaumeise20
Copy link

This would be really helpful for drawing borders around boxes.

g.draw_stroke_rect(rect, color, thickness);
@Revertron
Copy link
Contributor

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

@dennisorlando
Copy link
Contributor

dennisorlando commented Mar 28, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants