pub struct VideoLayer {
pub source: PathBuf,
pub x: AnimatedValue<f64>,
pub y: AnimatedValue<f64>,
pub scale_x: AnimatedValue<f64>,
pub scale_y: AnimatedValue<f64>,
pub rotation: AnimatedValue<f64>,
pub opacity: AnimatedValue<f64>,
pub z_order: u32,
pub time_offset: Duration,
pub in_point: Option<Duration>,
pub out_point: Option<Duration>,
}Expand description
A single video layer in a MultiTrackComposer composition.
Layers are composited in ascending z_order, with
0 rendered first (bottom of the stack).
The x, y, scale_x, scale_y, rotation, and opacity fields accept
either a constant (AnimatedValue::Static) or a time-varying keyframe
track (AnimatedValue::Track). The initial filter graph is built from
the value at Duration::ZERO; per-frame updates are added in issue #363.
Fields§
§source: PathBufSource media file path.
x: AnimatedValue<f64>X offset on the canvas in pixels (top-left origin).
y: AnimatedValue<f64>Y offset on the canvas in pixels.
scale_x: AnimatedValue<f64>Horizontal scale factor applied to the source frame (1.0 = original width).
scale_y: AnimatedValue<f64>Vertical scale factor applied to the source frame (1.0 = original height).
rotation: AnimatedValue<f64>Clockwise rotation in degrees (0.0 = no rotation).
opacity: AnimatedValue<f64>Opacity (0.0 = fully transparent, 1.0 = fully opaque).
z_order: u32Compositing order (0 = bottom layer; higher values render on top).
time_offset: DurationStart offset on the output timeline (Duration::ZERO = at the beginning).
in_point: Option<Duration>Optional trim start within the source file.
out_point: Option<Duration>Optional trim end within the source file.
Trait Implementations§
Source§impl Clone for VideoLayer
impl Clone for VideoLayer
Source§fn clone(&self) -> VideoLayer
fn clone(&self) -> VideoLayer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more