You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Rounded corners inside the new pan zoom demo don't scale properly when zooming.
To Reproduce
In the demo code, increase the corner radius of the egui::Frame from 4.0 to 20.0 (it is barely noticeable otherwise).
Zoom in and out.
Expected behavior
When zooming, the corner radius should stay consistent in relation to the rest of the shape.
Screenshots
Additional context
Multiplying the radius by transform.scaling in the demo code seems to fix the issue, however I'd expect this to be handled automatically.
I suppose this was simply overlooked in #3906.
I'd fix it myself but I've barely started using egui, so I'll leave it to the professionals :)
The text was updated successfully, but these errors were encountered:
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 <#4152>
hacknus
pushed a commit
to hacknus/egui
that referenced
this issue
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>
Describe the bug
Rounded corners inside the new pan zoom demo don't scale properly when zooming.
To Reproduce
In the demo code, increase the corner radius of the
egui::Frame
from 4.0 to 20.0 (it is barely noticeable otherwise).Zoom in and out.
Expected behavior
When zooming, the corner radius should stay consistent in relation to the rest of the shape.
Screenshots

Additional context
Multiplying the radius by
transform.scaling
in the demo code seems to fix the issue, however I'd expect this to be handled automatically.I suppose this was simply overlooked in #3906.
I'd fix it myself but I've barely started using egui, so I'll leave it to the professionals :)
The text was updated successfully, but these errors were encountered: