Struct asefile::ColorPalette
source · pub struct ColorPalette { /* private fields */ }
Expand description
The color palette embedded in the file.
Implementations§
source§impl ColorPalette
impl ColorPalette
sourcepub fn num_colors(&self) -> u32
pub fn num_colors(&self) -> u32
Total number of colors in the palette.
sourcepub fn color(&self, index: u32) -> Option<&ColorPaletteEntry>
pub fn color(&self, index: u32) -> Option<&ColorPaletteEntry>
Look up entry at given index.
The Aseprite file format spec does not guarantee the color indices to
go from 0..num_colors()
but there doesn’t seem to be a way to violate
this constraint using the Aseprite GUI.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColorPalette
impl RefUnwindSafe for ColorPalette
impl Send for ColorPalette
impl Sync for ColorPalette
impl Unpin for ColorPalette
impl UnwindSafe for ColorPalette
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