pub struct LayoutRect {
pub origin: LayoutPoint,
pub size: LayoutSize,
}
Expand description
Only used for calculations: Rectangle (x, y, width, height) in layout space.
Fields§
§origin: LayoutPoint
§size: LayoutSize
Implementations§
Source§impl LayoutRect
impl LayoutRect
pub fn new(origin: LayoutPoint, size: LayoutSize) -> Self
pub fn zero() -> Self
pub fn max_x(&self) -> f32
pub fn min_x(&self) -> f32
pub fn max_y(&self) -> f32
pub fn min_y(&self) -> f32
pub fn contains(&self, other: &LayoutPoint) -> bool
pub fn get_scroll_rect<I: Iterator<Item = Self>>( &self, children: I, ) -> Option<Self>
pub fn contains_rect(&self, b: &LayoutRect) -> bool
Trait Implementations§
Source§impl Clone for LayoutRect
impl Clone for LayoutRect
Source§fn clone(&self) -> LayoutRect
fn clone(&self) -> LayoutRect
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LayoutRect
impl Debug for LayoutRect
Source§impl Display for LayoutRect
impl Display for LayoutRect
Source§impl PartialEq for LayoutRect
impl PartialEq for LayoutRect
Source§impl PartialOrd for LayoutRect
impl PartialOrd for LayoutRect
impl Copy for LayoutRect
impl StructuralPartialEq for LayoutRect
Auto Trait Implementations§
impl Freeze for LayoutRect
impl RefUnwindSafe for LayoutRect
impl Send for LayoutRect
impl Sync for LayoutRect
impl Unpin for LayoutRect
impl UnwindSafe for LayoutRect
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)