pub enum Rotation {
None,
Clockwise90,
Half,
Clockwise270,
}Expand description
A rotation by a multiple of 90°, clockwise when displayed: a page’s /Rotate
(§7.7.3.3), or a view rotation added to it.
Added in 0.2.0.
Variants§
None
No rotation.
Clockwise90
90° clockwise.
Half
180°.
Clockwise270
270° clockwise (90° counter-clockwise).
Implementations§
Source§impl Rotation
impl Rotation
Sourcepub const fn from_degrees(degrees: i64) -> Option<Self>
pub const fn from_degrees(degrees: i64) -> Option<Self>
The rotation for degrees (any multiple of 90, negative included), else Option::None.
Added in 0.2.0.
Sourcepub const fn from_canonical_degrees(degrees: u16) -> Option<Self>
pub const fn from_canonical_degrees(degrees: u16) -> Option<Self>
The rotation for degrees written the canonical way, 0, 90, 180 or 270, else
Option::None: the check for values callers pass in (op JSON, the bindings), where
-90 or 450 is a mistake rather than a file to tolerate.
Added in 0.2.0.
Sourcepub fn from_object(value: &Object) -> Option<Self>
pub fn from_object(value: &Object) -> Option<Self>
The rotation a resolved /Rotate value states: an integer or an integral real that is
a multiple of 90 (90 and 90.0 alike), else Option::None.
Added in 0.2.0.
Sourcepub const fn is_quarter_turn(self) -> bool
pub const fn is_quarter_turn(self) -> bool
Whether the rotation swaps width and height.
Added in 0.2.0.
Trait Implementations§
impl Copy for Rotation
impl Eq for Rotation
impl StructuralPartialEq for Rotation
Auto Trait Implementations§
impl Forget for Rotation
impl Freeze for Rotation
impl Move 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