MutableAnimation

Trait MutableAnimation 

Source
pub trait MutableAnimation: Send {
    // Required methods
    fn set_size(&mut self, size: (f64, f64));
    fn add_layer(&mut self, new_layer_id: u64);
    fn remove_layer(&mut self, old_layer_id: u64);
    fn edit_layer<'a>(
        &'a mut self,
        layer_id: u64,
    ) -> Option<Editor<'a, dyn Layer>>;
}
Expand description

Trait implemented by objects that support editing the data associated with an animation

Normally edits are made by sending them via the edit() method in Animation. This used to edit the actual data structure associated with an animation.

Required Methods§

Source

fn set_size(&mut self, size: (f64, f64))

Sets the canvas size of this animation

Source

fn add_layer(&mut self, new_layer_id: u64)

Creates a new layer with a particular ID

Has no effect if the layer ID is already in use

Source

fn remove_layer(&mut self, old_layer_id: u64)

Removes the layer with the specified ID

Source

fn edit_layer<'a>(&'a mut self, layer_id: u64) -> Option<Editor<'a, dyn Layer>>

Opens a particular layer for editing

Implementors§