pub struct ClipComposition {
pub id: CompositionId,
pub offset: MediaTime,
pub scale: TimeScale,
}Expand description
A clip’s use of a Composition, and how its time maps onto it.
Composition time is offset + (t - clip start) * scale for timeline time
t, rounded down to a tick. Moving a clip keeps its offset, so its
animation moves with it; trimming its start by d adds d * scale to the
offset, so what remains of the animation stays where it was. Extending the
start before composition time zero makes the offset negative: settings
hold their first keyframe there, and media nodes show their first frame.
Fields§
§id: CompositionIdThe composition shown.
offset: MediaTimeComposition time at the clip’s start.
scale: TimeScaleComposition time per timeline time.
Implementations§
Source§impl ClipComposition
impl ClipComposition
Sourcepub const fn new(id: CompositionId) -> Self
pub const fn new(id: CompositionId) -> Self
Shows id from its time zero at the timeline’s rate.
Trait Implementations§
Source§impl Clone for ClipComposition
impl Clone for ClipComposition
Source§impl Debug for ClipComposition
impl Debug for ClipComposition
Source§impl<'de> Deserialize<'de> for ClipComposition
impl<'de> Deserialize<'de> for ClipComposition
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
impl Eq for ClipComposition
Source§impl PartialEq for ClipComposition
impl PartialEq for ClipComposition
Source§impl Serialize for ClipComposition
impl Serialize for ClipComposition
impl StructuralPartialEq for ClipComposition
Auto Trait Implementations§
impl Freeze for ClipComposition
impl RefUnwindSafe for ClipComposition
impl Send for ClipComposition
impl Sync for ClipComposition
impl Unpin for ClipComposition
impl UnsafeUnpin for ClipComposition
impl UnwindSafe for ClipComposition
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