pub struct Animation {
pub in_: Option<Anim>,
pub out: Option<Anim>,
pub position: Keys<2>,
pub scale: Keys<2>,
pub opacity: Keys<1>,
pub colour: Keys<4>,
}Expand description
A clip’s animation: its entrance, exit and keyframed parameters.
Fields§
§in_: Option<Anim>§out: Option<Anim>§position: Keys<2>Absolute position (fractions of the frame from its middle).
scale: Keys<2>Scale about the anchor, [x, y].
opacity: Keys<1>Multiplies the alpha.
colour: Keys<4>Replaces the text’s colour.
Implementations§
Source§impl Animation
impl Animation
Sourcepub fn parse(m: &Map<String, Value>) -> Self
pub fn parse(m: &Map<String, Value>) -> Self
From merged clip parameters: animation.{in,out} (else fade_in / fade_out) and
keyframes.{position,scale,opacity,colour}.
Sourcepub fn is_plain_fade(&self) -> bool
pub fn is_plain_fade(&self) -> bool
Whether the overlay’s own linear fades draw it (no motion needed).
Sourcepub fn raster_scale(&self) -> f32
pub fn raster_scale(&self) -> f32
The largest scale keyframed (at least 1, at most 4): rasterise at it so the text stays
sharp. An expression scale is read at the clip’s start only: use
Animation::raster_scale_over when the clip’s length is known.
Sourcepub fn raster_scale_over(&self, len: f64, fps: f64) -> f32
pub fn raster_scale_over(&self, len: f64, fps: f64) -> f32
Animation::raster_scale for a clip len seconds long at fps: an expression scale
is sampled on every frame.
Trait Implementations§
impl StructuralPartialEq for Animation
Auto Trait Implementations§
impl Forget for Animation
impl Freeze for Animation
impl RefUnwindSafe for Animation
impl Send for Animation
impl Sync for Animation
impl Unpin for Animation
impl UnsafeUnpin for Animation
impl UnwindSafe for Animation
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