Struct Rect
pub struct Rect {
pub origin: Point,
pub size: Size,
}Fields§
§origin: Point§size: SizeImplementations§
§impl Rect
impl Rect
pub const ZERO: Rect
pub const fn new(x: f64, y: f64, width: f64, height: f64) -> Rect
pub fn from_size(size: Size) -> Rect
pub fn min_x(&self) -> f64
pub fn min_y(&self) -> f64
pub fn max_x(&self) -> f64
pub fn max_y(&self) -> f64
pub fn center(&self) -> Point
pub fn inset(&self, d: f64) -> Rect
pub fn inset_by(&self, i: Insets) -> Rect
pub fn intersects(&self, other: &Rect) -> bool
Trait Implementations§
impl Copy for Rect
impl StructuralPartialEq for Rect
Auto Trait Implementations§
impl Freeze for Rect
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnsafeUnpin for Rect
impl UnwindSafe for Rect
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