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

RoundedRect bails out to rect if radius is zero #134

Merged
merged 1 commit into from
Dec 24, 2023

Conversation

Uriopass
Copy link
Contributor

This allows reusing the rounded rect everywhere a component can have rounded drawing needs without needed to special case the zero radius case (button region, box, ...) as well as handling pathological cases a bit nicer.

I think we could also merge colored_box with round_rect by simply having colored_box provide a border_radius parameter (we can keep the shorthand though)

@Uriopass Uriopass requested a review from LPGhatguy as a code owner December 23, 2023 22:40
Copy link
Member

@LPGhatguy LPGhatguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM

@LPGhatguy LPGhatguy merged commit 9f0a092 into SecondHalfGames:main Dec 24, 2023
2 checks passed
@Uriopass Uriopass deleted the zero_radius_rounded_rect branch January 24, 2024 11:17
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

Successfully merging this pull request may close these issues.

2 participants