pub struct IRect {
pub x0: i32,
pub y0: i32,
pub x1: i32,
pub y1: i32,
}
Expand description
A rectangle using integers instead of floats
Fields§
§x0: i32
§y0: i32
§x1: i32
§y1: i32
Implementations§
source§impl IRect
impl IRect
pub const INF: Self = _
pub const fn new(x0: i32, y0: i32, x1: i32, y1: i32) -> Self
pub fn is_empty(&self) -> bool
pub fn contains(&self, x: i32, y: i32) -> bool
pub fn width(&self) -> i32
pub fn height(&self) -> i32
pub fn origin(&self) -> Point
pub fn size(&self) -> Size
pub fn union(&mut self, other: IRect) -> &mut Self
Trait Implementations§
source§impl PartialEq for IRect
impl PartialEq for IRect
impl Copy for IRect
impl StructuralPartialEq for IRect
Auto Trait Implementations§
impl Freeze for IRect
impl RefUnwindSafe for IRect
impl Send for IRect
impl Sync for IRect
impl Unpin for IRect
impl UnwindSafe for IRect
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