pub struct Bounds {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
}Expand description
A world-space rectangle.
Fields§
§x: f32§y: f32§width: f32§height: f32Implementations§
Source§impl Bounds
impl Bounds
Sourcepub fn enclosing(
rects: impl IntoIterator<Item = (f32, f32, f32, f32)>,
padding: f32,
) -> Option<Self>
pub fn enclosing( rects: impl IntoIterator<Item = (f32, f32, f32, f32)>, padding: f32, ) -> Option<Self>
The rectangle enclosing every (x, y, width, height) given, grown by
padding on every side. None for an empty iterator.
GroupLogic::fit_bounds feeds it cached rectangles; a host that
knows its node sizes can feed it model rows directly and fit a group
synchronously in its drag commit, before the geometry reports arrive.
Trait Implementations§
impl Copy for Bounds
impl StructuralPartialEq for Bounds
Auto Trait Implementations§
impl Freeze for Bounds
impl RefUnwindSafe for Bounds
impl Send for Bounds
impl Sync for Bounds
impl Unpin for Bounds
impl UnsafeUnpin for Bounds
impl UnwindSafe for Bounds
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more