pub struct DirtyRegion {
pub x: u32,
pub y: u32,
pub width: u32,
pub height: u32,
}Expand description
Dirty region for incremental updates
Fields§
§x: u32Left coordinate
y: u32Top coordinate
width: u32Width
height: u32Height
Implementations§
Source§impl DirtyRegion
impl DirtyRegion
Sourcepub fn full_screen() -> Self
pub fn full_screen() -> Self
Create a full screen dirty region
Sourcepub fn intersects(&self, bounds: (u32, u32, u32, u32)) -> bool
pub fn intersects(&self, bounds: (u32, u32, u32, u32)) -> bool
Check if this region intersects with bounds
Sourcepub fn contains_point(&self, x: u32, y: u32) -> bool
pub fn contains_point(&self, x: u32, y: u32) -> bool
Check if region contains point
Trait Implementations§
Source§impl Clone for DirtyRegion
impl Clone for DirtyRegion
Source§fn clone(&self) -> DirtyRegion
fn clone(&self) -> DirtyRegion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DirtyRegion
Source§impl Debug for DirtyRegion
impl Debug for DirtyRegion
impl Eq for DirtyRegion
Source§impl PartialEq for DirtyRegion
impl PartialEq for DirtyRegion
Source§fn eq(&self, other: &DirtyRegion) -> bool
fn eq(&self, other: &DirtyRegion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DirtyRegion
Auto Trait Implementations§
impl Freeze for DirtyRegion
impl RefUnwindSafe for DirtyRegion
impl Send for DirtyRegion
impl Sync for DirtyRegion
impl Unpin for DirtyRegion
impl UnsafeUnpin for DirtyRegion
impl UnwindSafe for DirtyRegion
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more