#[repr(i32)]pub enum EncodedOrigin {
TopLeft = 1,
TopRight = 2,
BottomRight = 3,
BottomLeft = 4,
LeftTop = 5,
RightTop = 6,
RightBottom = 7,
LeftBottom = 8,
}
Expand description
These values match the orientation www.exif.org/Exif2-2.PDF.
Variants§
TopLeft = 1
Default
TopRight = 2
Reflected across y-axis
BottomRight = 3
Rotated 180
BottomLeft = 4
Reflected across x-axis
LeftTop = 5
Reflected across x-axis, Rotated 90 CCW
RightTop = 6
Rotated 90 CW
RightBottom = 7
Reflected across x-axis, Rotated 90 CW
LeftBottom = 8
Rotated 90 CCW
Implementations§
Source§impl EncodedOrigin
impl EncodedOrigin
pub const LAST: Self = EncodedOrigin::LeftBottom
pub const DEFAULT: Self = EncodedOrigin::TopLeft
Sourcepub fn to_matrix(self, size: impl Into<ISize>) -> Matrix
pub fn to_matrix(self, size: impl Into<ISize>) -> Matrix
Given an width and height of the source data, returns a matrix that transforms the source
rectangle with upper left corner at [0, 0]
and origin to a correctly oriented destination
rectangle of [0, 0, w, h]
.
Sourcepub fn swaps_width_height(self) -> bool
pub fn swaps_width_height(self) -> bool
Return true
if the encoded origin includes a 90 degree rotation, in which case the width
and height of the source data are swapped relative to a correctly oriented destination.
Trait Implementations§
Source§impl Clone for EncodedOrigin
impl Clone for EncodedOrigin
Source§fn clone(&self) -> EncodedOrigin
fn clone(&self) -> EncodedOrigin
Returns a copy 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 EncodedOrigin
impl Debug for EncodedOrigin
Source§impl Default for EncodedOrigin
impl Default for EncodedOrigin
Source§fn default() -> EncodedOrigin
fn default() -> EncodedOrigin
Returns the “default value” for a type. Read more
Source§impl Hash for EncodedOrigin
impl Hash for EncodedOrigin
Source§impl PartialEq for EncodedOrigin
impl PartialEq for EncodedOrigin
impl Copy for EncodedOrigin
impl Eq for EncodedOrigin
impl StructuralPartialEq for EncodedOrigin
Auto Trait Implementations§
impl Freeze for EncodedOrigin
impl RefUnwindSafe for EncodedOrigin
impl Send for EncodedOrigin
impl Sync for EncodedOrigin
impl Unpin for EncodedOrigin
impl UnwindSafe for EncodedOrigin
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