mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -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:
@@ -58,6 +58,12 @@ impl Rect {
|
||||
max: pos2(f32::NAN, f32::NAN),
|
||||
};
|
||||
|
||||
/// A [`Rect`] filled with zeroes.
|
||||
pub const ZERO: Self = Self {
|
||||
min: Pos2::ZERO,
|
||||
max: Pos2::ZERO,
|
||||
};
|
||||
|
||||
#[inline(always)]
|
||||
pub const fn from_min_max(min: Pos2, max: Pos2) -> Self {
|
||||
Rect { min, max }
|
||||
|
||||
Reference in New Issue
Block a user