mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
Make Region::child_bounds private
This commit is contained in:
@@ -358,12 +358,18 @@ impl Rect {
|
||||
}
|
||||
}
|
||||
|
||||
/// Expand by this much in each direction
|
||||
/// Expand by this much in each direction, keeping the center
|
||||
#[must_use]
|
||||
pub fn expand(self, amnt: f32) -> Self {
|
||||
Rect::from_center_size(self.center(), self.size() + 2.0 * vec2(amnt, amnt))
|
||||
}
|
||||
|
||||
/// Expand by this much in each direction, keeping the center
|
||||
#[must_use]
|
||||
pub fn expand2(self, amnt: Vec2) -> Self {
|
||||
Rect::from_center_size(self.center(), self.size() + 2.0 * amnt)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn translate(self, amnt: Vec2) -> Self {
|
||||
Rect::from_min_size(self.min + amnt, self.size())
|
||||
|
||||
Reference in New Issue
Block a user