Struct ds_rom::rom::BannerImages
source · pub struct BannerImages {
pub bitmap: BannerBitmap,
pub palette: BannerPalette,
pub animation_bitmaps: Option<Box<[BannerBitmap]>>,
pub animation_palettes: Option<Box<[BannerPalette]>>,
}Expand description
Icon for the Banner.
Fields§
§bitmap: BannerBitmapMain bitmap.
palette: BannerPaletteMain palette.
animation_bitmaps: Option<Box<[BannerBitmap]>>Bitmaps for animated icon.
animation_palettes: Option<Box<[BannerPalette]>>Palettes for animated icon
Implementations§
source§impl BannerImages
impl BannerImages
sourcepub fn from_bitmap(bitmap: BannerBitmap, palette: BannerPalette) -> Self
pub fn from_bitmap(bitmap: BannerBitmap, palette: BannerPalette) -> Self
Creates a new BannerImages from a bitmap and palette.
sourcepub fn load_bitmap_file<P: AsRef<Path> + Into<PathBuf>>(
&mut self,
bitmap_path: P,
palette_path: P,
) -> Result<(), BannerImageError>
pub fn load_bitmap_file<P: AsRef<Path> + Into<PathBuf>>( &mut self, bitmap_path: P, palette_path: P, ) -> Result<(), BannerImageError>
Loads from a bitmap and palette file.
§Errors
This function will return an error if Reader::open or Reader::decode fails, or if the images are the wrong
size, or the bitmap has a color not present in the palette.
sourcepub fn save_bitmap_file(&self, path: &Path) -> Result<(), BannerImageError>
pub fn save_bitmap_file(&self, path: &Path) -> Result<(), BannerImageError>
Trait Implementations§
source§impl Default for BannerImages
impl Default for BannerImages
source§fn default() -> BannerImages
fn default() -> BannerImages
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BannerImages
impl RefUnwindSafe for BannerImages
impl Send for BannerImages
impl Sync for BannerImages
impl Unpin for BannerImages
impl UnwindSafe for BannerImages
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