pub struct FixedRect {
pub x: u32,
pub y: u32,
pub w: u32,
pub h: u32,
}Expand description
A source rectangle in 16.16 fixed point: the kernel’s own SRC_*
encoding, for a crop at sub-pixel precision. A Wayland viewport’s source
rectangle, for one, is in 1/256ths of a pixel, and rounding it moves the
image by up to half a pixel and changes its scale. 1.0 is 0x10000.
Fields§
§x: u32Left edge.
y: u32Top edge.
w: u32Width; zero means the buffer’s full width.
h: u32Height; zero means the buffer’s full height.
Trait Implementations§
impl Copy for FixedRect
impl Eq for FixedRect
impl StructuralPartialEq for FixedRect
Auto Trait Implementations§
impl Freeze for FixedRect
impl RefUnwindSafe for FixedRect
impl Send for FixedRect
impl Sync for FixedRect
impl Unpin for FixedRect
impl UnsafeUnpin for FixedRect
impl UnwindSafe for FixedRect
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