Struct ilda::animation::Animation
[−]
[src]
pub struct Animation { /* fields omitted */ }
An animation is comprised of one or more frames.
Methods
impl Animation
[src]
fn read_file(filename: &str) -> Result<Animation, IldaError>
[src]
Read an animation from an ILDA file.
let filename = "examples/files/ildatest.ild"; let animation = Animation::read_file(filename).unwrap(); assert_eq!(2, animation.frame_count());
fn read_bytes(ilda_bytes: &[u8]) -> Result<Animation, IldaError>
[src]
Read an animation from raw ILDA bytes.
fn into_frame_iter<'a>(&'a self) -> AnimationFrameIterator<'a>
[src]
Get an frame iterator for the animation.
fn into_point_iter<'a>(&'a self) -> AnimationPointIterator<'a>
[src]
Get a point iterator for the animation, which will iterate over all points from all frames.
fn get_frames(&self) -> &Vec<Frame>
[src]
Return a reference to the frames.
fn frame_count(&self) -> usize
[src]
Return the number of frames in the animation.
fn get_frame(&self, position: usize) -> Option<&Frame>
[src]
Get a reference to the frame at the given offset, if it exists.