[−][src]Struct pathfinder::map::gif::Gif
Wrapper around the Gif struct found in the gif crate.
With additions for pathfinder support, and cycling features.
Methods
impl<'a> Gif<'a>
[src]
pub fn new(filename: &str, width: u16, height: u16) -> Self
[src]
Constructs a Gif struct and initializes a file on the system for the Gif to be stored.
Errors
If it is unable to create the Encoder, or if the file can not be created.
See also
examples/hello_world_gif.rs example/cycles.rs
pub fn cycle(&mut self, interval: u8, map: Vec<Node>)
[src]
pub fn cycle_predicate(
&mut self,
interval: u8,
map: Vec<Node>,
predicate: &'a dyn Fn(&Node) -> Node
)
[src]
&mut self,
interval: u8,
map: Vec<Node>,
predicate: &'a dyn Fn(&Node) -> Node
)
Adds in a repeating patttern every interval frame on to the gif image.
pub fn remove_cycles(&mut self)
[src]
Removes all cycles from the gif.
pub fn advance_cycle(&mut self) -> Vec<Node>
[src]
Advances the cycles and returns the patterns it matched.
pub fn frames(&self) -> u16
[src]
Returns the number of frames that has been written.
pub fn push(&mut self, map: Map) -> Result<(), Error>
[src]
Pushes a frame using a map struct.
pub fn push_frame(&mut self, image: &IW) -> Result<(), Error>
[src]
Pushes a frame to the structure, This also immediately saves it to disk.
Errors
If the encoder fails to write the frame to disk.
pub fn blank(&mut self) -> Result<(), Error>
[src]
Appends a blank frame to the gif.
This will also advance Gif cycles.
Auto Trait Implementations
impl<'a> !Sync for Gif<'a>
impl<'a> Unpin for Gif<'a>
impl<'a> !Send for Gif<'a>
impl<'a> !UnwindSafe for Gif<'a>
impl<'a> !RefUnwindSafe for Gif<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,