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

Fix scaling of rounded corners for rect shape #4161

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Fix scaling of rounded corners for rect shape #4161

merged 1 commit into from
Mar 12, 2024

Conversation

CrazyCraftix
Copy link
Contributor

When scaling an egui::Shape of variant Rect using the new transform function, corner rounding isn't taken into account.

The fix is to multiply the rounding by the scaling factor.

@CrazyCraftix
Copy link
Contributor Author

I hope I didn't miss anything, I haven't really done this before. I now see I probably should have referenced this PR from my commits instead of the issue. Oh well...

@emilk emilk changed the title fix scaling of rounded corners for rect shape (#4152) Fix scaling of rounded corners for rect shape (#4152) Mar 12, 2024
@emilk emilk merged commit 4a330de into emilk:master Mar 12, 2024
20 of 21 checks passed
@emilk emilk changed the title Fix scaling of rounded corners for rect shape (#4152) Fix scaling of rounded corners for rect shape Mar 12, 2024
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
When scaling an `egui::Shape` of variant `Rect` using the new
`transform` function, corner rounding isn't taken into account.

The fix is to multiply the rounding by the scaling factor.

* Closes <emilk#4152>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rounded corners don't scale properly in the new pan zoom demo
2 participants