Skip to main content

Reframe

Struct Reframe 

Source
pub struct Reframe {
    pub zoom: Option<Keyed<f64>>,
    pub zoom_center: Option<Keyed<[f64; 2]>>,
    pub punch: Vec<Punch>,
    pub push: Option<(f64, f64)>,
    pub push_center: Option<[f64; 2]>,
    pub pan: Option<([f64; 2], [f64; 2])>,
    pub crop_x: Slide,
    pub crop_y: Slide,
    pub fit: Fit,
    pub fit_y: f64,
    pub fill_blur: f64,
    pub focus: Option<[f64; 2]>,
}

Fields§

§zoom: Option<Keyed<f64>>

Base zoom (1 = the whole output-aspect window).

§zoom_center: Option<Keyed<[f64; 2]>>§punch: Vec<Punch>§push: Option<(f64, f64)>

[from, to] zoom, eased over the whole shot (half linear, half cosine, as render.py).

§push_center: Option<[f64; 2]>

Centre of the push (default zoom_center).

§pan: Option<([f64; 2], [f64; 2])>

The push centre moving [from, to] with the push’s easing.

§crop_x: Slide

Window position on wider sources (0 left .. 1 right).

§crop_y: Slide

Window position on taller sources (0 top .. 1 bottom).

§fit: Fit§fit_y: f64

fit: contain: the picture’s centre as a fraction of the output height (0.42).

§fill_blur: f64

fit: contain: blur radius of the fill around the picture, as a fraction of the placed picture’s height (0.04); 0 for black.

§focus: Option<[f64; 2]>

A split-screen panel’s [x, y] focus: the default crop_x, crop_y and zoom_center when it renders as a panel (Self::focused).

Implementations§

Source§

impl Reframe

Source

pub fn parse(params: &Map<String, Value>, profile: Option<&str>) -> Result<Self>

Reads the effect’s parameters (metadata.ffcine without schema) for profile: profiles.<profile> fields replace the base ones. Unknown fields are ignored (the Resolve importer’s timeline_size, the panels’ focus).

Source

pub fn from_effects( effects: &[Effect], profile: Option<&str>, ) -> Result<Option<Self>>

The first ffcine.geo.reframe/1 among a clip’s effects, for profile.

Source

pub fn focused(self) -> Self

For a split-screen panel: focus stands in for crop_x, crop_y and zoom_center where those aren’t set.

Source

pub fn frame(&self, i: u64, shot: &Shot, out: &Profile) -> Frame

Output frame i’s geometry.

Source

pub fn frame_in(&self, i: u64, shot: &Shot, out: &Profile, full: Rect) -> Frame

Output frame i’s geometry with the picture being full, a part of the source (an NLE crop that fills the frame).

Source

pub fn frames(&self, shot: &Shot, out: &Profile) -> Vec<Frame>

Every output frame’s geometry.

Source

pub fn is_animated(&self) -> bool

Whether the window changes over the shot.

Trait Implementations§

Source§

impl Clone for Reframe

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Reframe

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Reframe

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Reframe

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Reframe

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.