pub struct SpriteSheet { /* private fields */ }Expand description
Sprite sheet slicing descriptor over an RGBA8 ImageBuffer.
Implementations§
Source§impl SpriteSheet
Frame slicing helpers for SpriteSheet.
impl SpriteSheet
Frame slicing helpers for SpriteSheet.
Sourcepub fn from_grid(
texture: ImageBuffer,
frame_width: u32,
frame_height: u32,
) -> Self
pub fn from_grid( texture: ImageBuffer, frame_width: u32, frame_height: u32, ) -> Self
Source§impl SpriteSheet
impl SpriteSheet
pub fn get_texture(&self) -> &ImageBuffer
pub fn get_mut_texture(&mut self) -> &mut ImageBuffer
pub fn set_texture(&mut self, val: ImageBuffer) -> &mut Self
pub fn get_frame_width(&self) -> u32
pub fn get_mut_frame_width(&mut self) -> &mut u32
pub fn set_frame_width(&mut self, val: u32) -> &mut Self
pub fn get_frame_height(&self) -> u32
pub fn get_mut_frame_height(&mut self) -> &mut u32
pub fn set_frame_height(&mut self, val: u32) -> &mut Self
pub fn get_columns(&self) -> u32
pub fn get_mut_columns(&mut self) -> &mut u32
pub fn set_columns(&mut self, val: u32) -> &mut Self
Trait Implementations§
Source§impl Clone for SpriteSheet
impl Clone for SpriteSheet
Auto Trait Implementations§
impl Forget for SpriteSheet
impl Freeze for SpriteSheet
impl Move for SpriteSheet
impl RefUnwindSafe for SpriteSheet
impl Send for SpriteSheet
impl Sync for SpriteSheet
impl Unpin for SpriteSheet
impl UnsafeUnpin for SpriteSheet
impl UnwindSafe for SpriteSheet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more