pub struct IndexedPalette { /* private fields */ }Implementations§
Source§impl IndexedPalette
impl IndexedPalette
pub fn new(family: &PaletteFamily) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn colors(&self) -> &[Rgb]
Sourcepub fn ember(band: u8, level: u8) -> u8
pub fn ember(band: u8, level: u8) -> u8
Ember entry for a background band and level 1..=LEVELS.
Sourcepub fn sprite_index(&self, rgb: Rgb) -> Option<u8>
pub fn sprite_index(&self, rgb: Rgb) -> Option<u8>
Palette index of a sprite colour.
Trait Implementations§
Source§impl Clone for IndexedPalette
impl Clone for IndexedPalette
Source§impl Debug for IndexedPalette
impl Debug for IndexedPalette
impl Eq for IndexedPalette
Source§impl PartialEq for IndexedPalette
impl PartialEq for IndexedPalette
impl StructuralPartialEq for IndexedPalette
Auto Trait Implementations§
impl Forget for IndexedPalette
impl Freeze for IndexedPalette
impl Move for IndexedPalette
impl RefUnwindSafe for IndexedPalette
impl Send for IndexedPalette
impl Sync for IndexedPalette
impl Unpin for IndexedPalette
impl UnsafeUnpin for IndexedPalette
impl UnwindSafe for IndexedPalette
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