[−][src]Struct silver_animation::LinearConfig
A more advanced animation than SimpleLinearConfig. It follows the same idea however you are in full control over what is used to draw images and how they are drawn.
Fields
begin_state: T
Data needed to draw the animation. This can be mutated during draw calls if needed.
timing: Timer
Controls how fast the animation plays.
draw: DrawFunc
The function that will actuall draw the current animation frame.
max_frames: MaxFrames
How many frames the animation has before it loops.
Implementations
impl<T, DrawFunc, MaxFrames> LinearConfig<T, DrawFunc, MaxFrames> where
DrawFunc: Fn(&mut T, usize, &mut Graphics, Rectangle) -> Result<()>,
MaxFrames: Fn(&T) -> usize,
[src]
DrawFunc: Fn(&mut T, usize, &mut Graphics, Rectangle) -> Result<()>,
MaxFrames: Fn(&T) -> usize,
pub fn into_animation(self) -> Linear<T, DrawFunc, MaxFrames>
[src]
Turn the config into an actual animation.
Auto Trait Implementations
impl<T, DrawFunc, MaxFrames> RefUnwindSafe for LinearConfig<T, DrawFunc, MaxFrames> where
DrawFunc: RefUnwindSafe,
MaxFrames: RefUnwindSafe,
T: RefUnwindSafe,
DrawFunc: RefUnwindSafe,
MaxFrames: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, DrawFunc, MaxFrames> Send for LinearConfig<T, DrawFunc, MaxFrames> where
DrawFunc: Send,
MaxFrames: Send,
T: Send,
DrawFunc: Send,
MaxFrames: Send,
T: Send,
impl<T, DrawFunc, MaxFrames> Sync for LinearConfig<T, DrawFunc, MaxFrames> where
DrawFunc: Sync,
MaxFrames: Sync,
T: Sync,
DrawFunc: Sync,
MaxFrames: Sync,
T: Sync,
impl<T, DrawFunc, MaxFrames> Unpin for LinearConfig<T, DrawFunc, MaxFrames> where
DrawFunc: Unpin,
MaxFrames: Unpin,
T: Unpin,
DrawFunc: Unpin,
MaxFrames: Unpin,
T: Unpin,
impl<T, DrawFunc, MaxFrames> UnwindSafe for LinearConfig<T, DrawFunc, MaxFrames> where
DrawFunc: UnwindSafe,
MaxFrames: UnwindSafe,
T: UnwindSafe,
DrawFunc: UnwindSafe,
MaxFrames: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> 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>,