pub enum Rotation {
None,
Quarter,
Half,
ThreeQuarter,
}Expand description
How the sprite is turned before it reaches the plane.
Reflections are not here. No driver has asked for them, and a flag nobody sets is a branch nobody tests.
Variants§
None
Upright.
Quarter
A quarter turn clockwise.
Half
Half a turn.
ThreeQuarter
Three quarters clockwise.
Implementations§
Source§impl Rotation
impl Rotation
Sourcepub const fn drm_mask(self) -> u64
pub const fn drm_mask(self) -> u64
The DRM_MODE_ROTATE_* bit for this rotation.
Restated rather than pulled from a binding: these are UAPI constants, and the whole point of asking is to compare against a plane’s supported mask before deciding whether the hardware can do the turn.
Sourcepub const fn swaps_axes(self) -> bool
pub const fn swaps_axes(self) -> bool
Whether this rotation exchanges width and height.
Trait Implementations§
impl Copy for Rotation
impl Eq for Rotation
impl StructuralPartialEq for Rotation
Auto Trait Implementations§
impl Freeze for Rotation
impl RefUnwindSafe for Rotation
impl Send for Rotation
impl Sync for Rotation
impl Unpin for Rotation
impl UnsafeUnpin for Rotation
impl UnwindSafe for Rotation
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