pub struct ClipRect {
pub x0: i64,
pub y0: i64,
pub x1: i64,
pub y1: i64,
}Expand description
An integer-bounded clip rectangle: [x0, x1) × [y0, y1).
Fields§
§x0: i64Inclusive left bound.
y0: i64Inclusive top bound.
x1: i64Exclusive right bound.
y1: i64Exclusive bottom bound.
Implementations§
Source§impl ClipRect
impl ClipRect
Sourcepub fn full(width: u32, height: u32) -> Self
pub fn full(width: u32, height: u32) -> Self
A clip covering the whole framebuffer [0, width) × [0, height).
Sourcepub fn from_rect(x: i64, y: i64, w: i64, h: i64) -> Self
pub fn from_rect(x: i64, y: i64, w: i64, h: i64) -> Self
Construct from a position and size (negative sizes yield an empty clip).
Trait Implementations§
impl Copy for ClipRect
impl Eq for ClipRect
impl StructuralPartialEq for ClipRect
Auto Trait Implementations§
impl Freeze for ClipRect
impl RefUnwindSafe for ClipRect
impl Send for ClipRect
impl Sync for ClipRect
impl Unpin for ClipRect
impl UnsafeUnpin for ClipRect
impl UnwindSafe for ClipRect
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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