pub struct DamageRegion { /* private fields */ }Expand description
Dirty bounding region tracking damaged screen areas between frames using zero-allocation inline stack storage.
Implementations§
Source§impl DamageRegion
Damage accumulation helpers for DamageRegion.
impl DamageRegion
Damage accumulation helpers for DamageRegion.
Sourcepub fn add_rect(&mut self, rect: Rect)
pub fn add_rect(&mut self, rect: Rect)
Expands the damaged region to include rect, normalizing disjoint regions inline on the stack.
§Arguments
&Self- Mutable damage region.Rect- Newly damaged rectangle.
Sourcepub fn bounds_rect(&self) -> Option<Rect>
pub fn bounds_rect(&self) -> Option<Rect>
Source§impl DamageRegion
impl DamageRegion
pub fn get_full_damage(&self) -> bool
pub fn get_mut_full_damage(&mut self) -> &mut bool
pub fn set_full_damage(&mut self, val: bool) -> &mut Self
pub fn get_mut_rect(&mut self) -> &mut Option<Rect>
pub fn set_rect(&mut self, val: Option<Rect>) -> &mut Self
Trait Implementations§
Source§impl Clone for DamageRegion
impl Clone for DamageRegion
impl Copy for DamageRegion
Source§impl Debug for DamageRegion
impl Debug for DamageRegion
Source§impl Default for DamageRegion
impl Default for DamageRegion
Source§impl PartialEq for DamageRegion
impl PartialEq for DamageRegion
impl StructuralPartialEq for DamageRegion
Auto Trait Implementations§
impl Forget for DamageRegion
impl Freeze for DamageRegion
impl Move for DamageRegion
impl RefUnwindSafe for DamageRegion
impl Send for DamageRegion
impl Sync for DamageRegion
impl Unpin for DamageRegion
impl UnsafeUnpin for DamageRegion
impl UnwindSafe for DamageRegion
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