pub struct PixelDirtyRect { /* private fields */ }Expand description
Physical pixel dirty sub-rectangle used by adaptive GLES 3.0 and Metal texture upload planners.
Implementations§
Source§impl PixelDirtyRect
Geometry and byte-size helpers for PixelDirtyRect.
impl PixelDirtyRect
Geometry and byte-size helpers for PixelDirtyRect.
Sourcepub fn right(&self) -> u32
pub fn right(&self) -> u32
Returns the exclusive right pixel edge (x + width).
§Returns
u32- Exclusive right coordinate in pixels.
Sourcepub fn bottom(&self) -> u32
pub fn bottom(&self) -> u32
Returns the exclusive bottom pixel edge (y + height).
§Returns
u32- Exclusive bottom coordinate in pixels.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true when either width or height is zero.
§Returns
bool-truewhen the rectangle covers zero pixels.
Sourcepub fn area_pixels(&self) -> usize
pub fn area_pixels(&self) -> usize
Sourcepub fn byte_size_rgba8(&self) -> usize
pub fn byte_size_rgba8(&self) -> usize
Sourcepub fn union_with(&self, other: Self) -> Self
pub fn union_with(&self, other: Self) -> Self
Sourcepub fn intersects_or_adjacent(&self, other: Self, pad_px: u32) -> bool
pub fn intersects_or_adjacent(&self, other: Self, pad_px: u32) -> bool
Source§impl PixelDirtyRect
impl PixelDirtyRect
pub fn get_x(&self) -> u32
pub fn get_mut_x(&mut self) -> &mut u32
pub fn set_x(&mut self, val: u32) -> &mut Self
pub fn get_y(&self) -> u32
pub fn get_mut_y(&mut self) -> &mut u32
pub fn set_y(&mut self, val: u32) -> &mut Self
pub fn get_width(&self) -> u32
pub fn get_mut_width(&mut self) -> &mut u32
pub fn set_width(&mut self, val: u32) -> &mut Self
pub fn get_height(&self) -> u32
pub fn get_mut_height(&mut self) -> &mut u32
pub fn set_height(&mut self, val: u32) -> &mut Self
Trait Implementations§
Source§impl Clone for PixelDirtyRect
impl Clone for PixelDirtyRect
impl Copy for PixelDirtyRect
Source§impl Debug for PixelDirtyRect
impl Debug for PixelDirtyRect
Source§impl Default for PixelDirtyRect
impl Default for PixelDirtyRect
impl Eq for PixelDirtyRect
Source§impl PartialEq for PixelDirtyRect
impl PartialEq for PixelDirtyRect
impl StructuralPartialEq for PixelDirtyRect
Auto Trait Implementations§
impl Forget for PixelDirtyRect
impl Freeze for PixelDirtyRect
impl Move for PixelDirtyRect
impl RefUnwindSafe for PixelDirtyRect
impl Send for PixelDirtyRect
impl Sync for PixelDirtyRect
impl Unpin for PixelDirtyRect
impl UnsafeUnpin for PixelDirtyRect
impl UnwindSafe for PixelDirtyRect
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