pub struct Rect {
pub x: i32,
pub y: i32,
pub width: u32,
pub height: u32,
}Expand description
A damage rectangle, in buffer pixels.
Deliberately not drmkit_planes::Rect. That one is a plane’s source or
destination rectangle in CRTC coordinates; this is a region of a buffer the
producer owns, and the two spaces coincide only when a layer happens to be
unscaled and at the origin. Sharing the type would invite passing one where
the other is meant, which is a bug no compiler would catch.
Fields§
§x: i32Left edge.
y: i32Top edge.
width: u32Width in pixels.
height: u32Height in pixels.
Trait Implementations§
impl Copy for Rect
impl Eq 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