Trait flo_animation::Animation
[−]
[src]
pub trait Animation: Send + Sync { fn size(&self) -> (f64, f64); fn duration(&self) -> Duration; fn frame_length(&self) -> Duration; fn get_layer_ids(&self) -> Vec<u64>; fn get_layer_with_id<'a>(
&'a self,
layer_id: u64
) -> Option<Reader<'a, Layer>>; fn get_log<'a>(&'a self) -> Reader<'a, EditLog<AnimationEdit>>; fn edit<'a>(&'a self) -> Editor<'a, PendingEditLog<AnimationEdit>>; fn edit_layer<'a>(
&'a self,
layer_id: u64
) -> Editor<'a, PendingEditLog<LayerEdit>>; }
Represents an animation
Required Methods
fn size(&self) -> (f64, f64)
Retrieves the frame size of this animation
fn duration(&self) -> Duration
Retrieves the length of this animation
fn frame_length(&self) -> Duration
Retrieves the duration of a single frame
fn get_layer_ids(&self) -> Vec<u64>
Retrieves the IDs of the layers in this object
fn get_layer_with_id<'a>(&'a self, layer_id: u64) -> Option<Reader<'a, Layer>>
Retrieves the layer with the specified ID from this animation
fn get_log<'a>(&'a self) -> Reader<'a, EditLog<AnimationEdit>>
Retrieves the log for this animation
fn edit<'a>(&'a self) -> Editor<'a, PendingEditLog<AnimationEdit>>
Retrieves an edit log that can be used to alter this animation
fn edit_layer<'a>(
&'a self,
layer_id: u64
) -> Editor<'a, PendingEditLog<LayerEdit>>
&'a self,
layer_id: u64
) -> Editor<'a, PendingEditLog<LayerEdit>>
Retrieves an edit log that can be used to edit a layer in this animation
Implementors
impl Animation for InMemoryAnimation