pub struct Rect {
pub origin: Point,
pub size: Size,
}Fields§
§origin: Point§size: SizeImplementations§
Source§impl Rect
impl Rect
pub const fn new(origin: Point, size: Size) -> Self
pub const fn xywh(x: f32, y: f32, width: f32, height: f32) -> Self
pub fn x(self) -> f32
pub fn y(self) -> f32
pub fn width(self) -> f32
pub fn height(self) -> f32
pub fn right(self) -> f32
pub fn bottom(self) -> f32
pub fn inset(self, insets: Insets) -> Self
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