Struct blit::aseprite_feature::AnimationBlitBuffer
[−]
[src]
pub struct AnimationBlitBuffer { /* fields omitted */ }
BlitBuffer
with extra information and functions to animate a sheet.
Methods
impl AnimationBlitBuffer
[src]
pub fn new(buffer: BlitBuffer, info: SpritesheetData) -> Self
[src]
pub fn blit_frame(
&self,
dst: &mut [u32],
dst_width: usize,
offset: (i32, i32),
frame: usize
) -> Result<(), Box<Error>>
[src]
&self,
dst: &mut [u32],
dst_width: usize,
offset: (i32, i32),
frame: usize
) -> Result<(), Box<Error>>
Draw one frame from the animation.
pub fn blit(
&self,
dst: &mut [u32],
dst_width: usize,
offset: (i32, i32),
info: &Animation
) -> Result<(), Box<Error>>
[src]
&self,
dst: &mut [u32],
dst_width: usize,
offset: (i32, i32),
info: &Animation
) -> Result<(), Box<Error>>
Draw the current frame using the animation info.
pub fn save<P>(&self, path: P) -> Result<(), Box<Error>> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Saves the buffer to a file at the path specified. A custom binary format is used for this.
pub fn open<P>(path: P) -> Result<Self, Box<Error>> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Create a new buffer from a file at the path specified. The file needs to be the custom binary format.
pub fn from_memory(buffer: &[u8]) -> Result<Self, Box<Error>>
[src]
Create a new buffer from a file at the path specified. The array needs to be the custom binary format.