pub enum AspectRatio {
Wide,
Vertical,
Square,
Classic,
}Expand description
Output aspect ratio. Drives the composed-canvas dimensions; changing it reframes the export (e.g. a 16:9 desktop recording → a 9:16 short).
Variants§
Wide
16:9 widescreen — the default.
Vertical
9:16 vertical (shorts / reels).
Square
1:1 square.
Classic
4:3 classic.
Implementations§
Source§impl AspectRatio
impl AspectRatio
Sourcepub fn canvas_dims(self, long_edge: u32) -> (u32, u32)
pub fn canvas_dims(self, long_edge: u32) -> (u32, u32)
Canvas pixel dimensions whose longer edge is long_edge,
preserving the ratio. Both edges are rounded down to even numbers
(H.264 chroma subsampling requires even dimensions).
Trait Implementations§
Source§impl Clone for AspectRatio
impl Clone for AspectRatio
Source§fn clone(&self) -> AspectRatio
fn clone(&self) -> AspectRatio
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AspectRatio
impl Debug for AspectRatio
Source§impl Default for AspectRatio
impl Default for AspectRatio
Source§fn default() -> AspectRatio
fn default() -> AspectRatio
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AspectRatio
impl<'de> Deserialize<'de> for AspectRatio
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AspectRatio
impl PartialEq for AspectRatio
Source§fn eq(&self, other: &AspectRatio) -> bool
fn eq(&self, other: &AspectRatio) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AspectRatio
impl Serialize for AspectRatio
impl Copy for AspectRatio
impl Eq for AspectRatio
impl StructuralPartialEq for AspectRatio
Auto Trait Implementations§
impl Freeze for AspectRatio
impl RefUnwindSafe for AspectRatio
impl Send for AspectRatio
impl Sync for AspectRatio
impl Unpin for AspectRatio
impl UnsafeUnpin for AspectRatio
impl UnwindSafe for AspectRatio
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