pub enum Rotation {
Deg0,
Deg90,
Deg180,
Deg270,
}Expand description
Clockwise rotation to apply when displaying a frame.
This is the convention of the WebCodecs VideoFrame.rotation. A binding
whose source states rotation another way converts it: FFmpeg’s display
matrix angle is counter-clockwise, so a binding reports (-angle) mod 360.
Variants§
Deg0
No rotation.
Deg90
Clockwise quarter turn.
Deg180
Half turn.
Deg270
Clockwise three-quarter turn, i.e. a counter-clockwise quarter turn.
Implementations§
Source§impl Rotation
impl Rotation
Sourcepub const fn quarter_turns(self) -> u32
pub const fn quarter_turns(self) -> u32
Clockwise quarter turns, 0..4.
Sourcepub const fn from_quarter_turns(quarter_turns: i32) -> Self
pub const fn from_quarter_turns(quarter_turns: i32) -> Self
The rotation of quarter_turns clockwise quarter turns, of any sign.
Sourcepub const fn swaps_axes(self) -> bool
pub const fn swaps_axes(self) -> bool
Whether the 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