mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
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 <https://github.com/emilk/egui/issues/4152>
This commit is contained in:
@@ -403,6 +403,7 @@ impl Shape {
|
||||
Self::Rect(rect_shape) => {
|
||||
rect_shape.rect = transform * rect_shape.rect;
|
||||
rect_shape.stroke.width *= transform.scaling;
|
||||
rect_shape.rounding *= transform.scaling;
|
||||
}
|
||||
Self::Text(text_shape) => {
|
||||
text_shape.pos = transform * text_shape.pos;
|
||||
|
||||
Reference in New Issue
Block a user