pub enum AsepritePixel {
RGBA(AsepriteColor),
Grayscale {
intensity: u16,
alpha: u16,
},
Indexed(u8),
}
Expand description
A single pixel
Variants§
Implementations§
Source§impl AsepritePixel
impl AsepritePixel
Sourcepub fn get_rgba(
&self,
palette: Option<&AsepritePalette>,
transparent_palette: Option<u8>,
) -> Result<[u8; 4], AsepriteError>
pub fn get_rgba( &self, palette: Option<&AsepritePalette>, transparent_palette: Option<u8>, ) -> Result<[u8; 4], AsepriteError>
Get the pixel as an array of RGBA values
Trait Implementations§
Source§impl Clone for AsepritePixel
impl Clone for AsepritePixel
Source§fn clone(&self) -> AsepritePixel
fn clone(&self) -> AsepritePixel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for AsepritePixel
impl RefUnwindSafe for AsepritePixel
impl Send for AsepritePixel
impl Sync for AsepritePixel
impl Unpin for AsepritePixel
impl UnwindSafe for AsepritePixel
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