[−][src]Struct blit::aseprite_feature::AnimationBlitBuffer
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<dyn Error>>
[src]
&self,
dst: &mut [u32],
dst_width: usize,
offset: (i32, i32),
frame: usize
) -> Result<(), Box<dyn Error>>
Draw one frame from the animation.
pub fn blit(
&self,
dst: &mut [u32],
dst_width: usize,
offset: (i32, i32),
info: &Animation
) -> Result<(), Box<dyn Error>>
[src]
&self,
dst: &mut [u32],
dst_width: usize,
offset: (i32, i32),
info: &Animation
) -> Result<(), Box<dyn Error>>
Draw the current frame using the animation info.
pub fn save<P>(&self, path: P) -> Result<(), Box<dyn 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<dyn 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<dyn Error>>
[src]
Create a new buffer from a file at the path specified. The array needs to be the custom binary format.
Trait Implementations
impl Debug for AnimationBlitBuffer
[src]
impl<'de> Deserialize<'de> for AnimationBlitBuffer
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for AnimationBlitBuffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for AnimationBlitBuffer
impl Send for AnimationBlitBuffer
impl Sync for AnimationBlitBuffer
impl Unpin for AnimationBlitBuffer
impl UnwindSafe for AnimationBlitBuffer
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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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>,