#[repr(u16)]pub enum Orientation {
Id = 1,
Rotation90 = 8,
Rotation180 = 3,
Rotation270 = 6,
Mirrored = 2,
MirroredRotation90 = 5,
MirroredRotation180 = 4,
MirroredRotation270 = 7,
}Expand description
Operations that have to be applied to orient the image correctly
Rotations are counter-clockwise
Variants§
Id = 1
Rotation90 = 8
Rotation180 = 3
Rotation270 = 6
Mirrored = 2
MirroredRotation90 = 5
MirroredRotation180 = 4
MirroredRotation270 = 7
Implementations§
Source§impl Orientation
impl Orientation
pub fn new(mirrored: bool, rotation: Rotation) -> Self
Sourcepub fn combine(self, orientation: Orientation) -> Orientation
pub fn combine(self, orientation: Orientation) -> Orientation
Combine two orientation changes to one
The orientation is applied after self
pub fn add_mirror_horizontally(self) -> Orientation
pub fn add_mirror_vertically(self) -> Orientation
pub fn add_rotation(self, rotation: Rotation) -> Orientation
Trait Implementations§
Source§impl Clone for Orientation
impl Clone for Orientation
Source§fn clone(&self) -> Orientation
fn clone(&self) -> Orientation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Orientation
impl Debug for Orientation
Source§impl From<Orientation> for u16
Convert enum to it’s discriminant value
impl From<Orientation> for u16
Convert enum to it’s discriminant value
Source§fn from(v: Orientation) -> u16
fn from(v: Orientation) -> u16
Converts to this type from the input type.
Source§impl PartialEq for Orientation
impl PartialEq for Orientation
Source§impl TryFrom<u16> for Orientation
Create enum from it’s discriminant value
impl TryFrom<u16> for Orientation
Create enum from it’s discriminant value
impl Copy for Orientation
impl Eq for Orientation
impl StructuralPartialEq for Orientation
Auto Trait Implementations§
impl Freeze for Orientation
impl RefUnwindSafe for Orientation
impl Send for Orientation
impl Sync for Orientation
impl Unpin for Orientation
impl UnwindSafe for Orientation
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