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:
parent
d0a6bbf2b8
commit
4a330de53d
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue