pub struct VideoLayer {
pub source: PathBuf,
pub x: i32,
pub y: i32,
pub scale: f32,
pub opacity: f32,
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).
Fields§
§source: PathBufSource media file path.
x: i32X offset on the canvas in pixels (top-left origin).
y: i32Y offset on the canvas in pixels.
scale: f32Uniform scale factor applied to the source frame (1.0 = original size).
opacity: f32Opacity (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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VideoLayer
impl RefUnwindSafe for VideoLayer
impl Send for VideoLayer
impl Sync for VideoLayer
impl Unpin for VideoLayer
impl UnsafeUnpin for VideoLayer
impl UnwindSafe for VideoLayer
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