1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Support images with rounded corners (#3257)

* Add `Rect::ZERO`

* Add `Rounding::ZERO`

* Add `RectShape::new`

* Add `Image::rounding` to support images with rounded corners
This commit is contained in:
Emil Ernerfeldt
2023-08-15 09:29:30 +02:00
committed by GitHub
parent 481f44828c
commit 3c4223c6b1
21 changed files with 302 additions and 123 deletions

View File

@@ -64,12 +64,7 @@ pub fn drop_target<R>(
ui.painter().set(
where_to_put_background,
epaint::RectShape {
rounding: style.rounding,
fill,
stroke,
rect,
},
epaint::RectShape::new(rect, style.rounding, fill, stroke),
);
InnerResponse::new(ret, response)