pub struct SpriteAtlas {
pub width: u32,
pub height: u32,
pub frame_width: u32,
pub frame_height: u32,
pub frame_count: u32,
pub rgba: Vec<u8>,
}Expand description
A sprite atlas: width×height RGBA8 pixels holding frame_count
frames of frame_width×frame_height, laid out row-major.
Fields§
§width: u32Atlas width in pixels.
height: u32Atlas height in pixels.
frame_width: u32Frame width in pixels.
frame_height: u32Frame height in pixels.
frame_count: u32Number of frames in the atlas.
rgba: Vec<u8>RGBA8 pixels, width * height * 4 bytes.
Implementations§
Trait Implementations§
Source§impl Clone for SpriteAtlas
impl Clone for SpriteAtlas
Source§fn clone(&self) -> SpriteAtlas
fn clone(&self) -> SpriteAtlas
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpriteAtlas
impl Debug for SpriteAtlas
Source§impl<'de> Deserialize<'de> for SpriteAtlas
impl<'de> Deserialize<'de> for SpriteAtlas
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SpriteAtlas
impl PartialEq for SpriteAtlas
Source§impl Serialize for SpriteAtlas
impl Serialize for SpriteAtlas
impl StructuralPartialEq for SpriteAtlas
Auto Trait Implementations§
impl Freeze for SpriteAtlas
impl RefUnwindSafe for SpriteAtlas
impl Send for SpriteAtlas
impl Sync for SpriteAtlas
impl Unpin for SpriteAtlas
impl UnsafeUnpin for SpriteAtlas
impl UnwindSafe for SpriteAtlas
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