|
| Bitmap ()=default |
|
| Bitmap (int width, int height, int depth, const std::vector< uint8_t > &data) |
| Create a bitmap with the given dimensions and data.
|
|
| Bitmap (int width, int height, int depth, const std::vector< uint8_t > &data, const SnesPalette &palette) |
| Create a bitmap with the given dimensions, data, and palette.
|
|
void | Initialize (int width, int height, int depth, std::span< uint8_t > &data) |
| Initialize the bitmap with the given dimensions and data.
|
|
void | Create (int width, int height, int depth, std::span< uint8_t > data) |
| Create a bitmap with the given dimensions and data.
|
|
void | Create (int width, int height, int depth, const std::vector< uint8_t > &data) |
| Create a bitmap with the given dimensions and data.
|
|
void | Create (int width, int height, int depth, int format, const std::vector< uint8_t > &data) |
| Create a bitmap with the given dimensions, format, and data.
|
|
void | Reformat (int format) |
| Reformat the bitmap to use a different pixel format.
|
|
void | SaveSurfaceToFile (std::string_view filename) |
| Save the bitmap surface to a file.
|
|
void | CreateTexture (SDL_Renderer *renderer) |
| Creates the underlying SDL_Texture to be displayed.
|
|
void | UpdateTexture (SDL_Renderer *renderer) |
| Updates the underlying SDL_Texture when it already exists.
|
|
void | UpdateTextureData () |
| Updates the texture data from the surface.
|
|
void | CleanupUnusedTexture (uint64_t current_time, uint64_t timeout) |
| Clean up unused textures after a timeout.
|
|
void | SetPalette (const SnesPalette &palette) |
| Set the palette for the bitmap.
|
|
void | SetPalette (const std::vector< SDL_Color > &palette) |
| Set the palette using SDL colors.
|
|
void | SetPaletteWithTransparent (const SnesPalette &palette, size_t index, int length=7) |
| Set the palette with a transparent color.
|
|
void | SetPaletteFromPaletteGroup (const SnesPalette &palette, int palette_id) |
| Set the palette from a palette group.
|
|
void | WriteToPixel (int position, uint8_t value) |
| Write a value to a pixel at the given position.
|
|
void | WriteColor (int position, const ImVec4 &color) |
| Write a color to a pixel at the given position.
|
|
void | Get8x8Tile (int tile_index, int x, int y, std::vector< uint8_t > &tile_data, int &tile_data_offset) |
| Extract an 8x8 tile from the bitmap.
|
|
void | Get16x16Tile (int tile_x, int tile_y, std::vector< uint8_t > &tile_data, int &tile_data_offset) |
| Extract a 16x16 tile from the bitmap.
|
|
void | Cleanup () |
| Clean up the bitmap resources.
|
|
void | Clear () |
| Clear the bitmap data.
|
|
const SnesPalette & | palette () const |
|
SnesPalette * | mutable_palette () |
|
int | width () const |
|
int | height () const |
|
int | depth () const |
|
int | size () const |
|
const uint8_t * | data () const |
|
std::vector< uint8_t > & | mutable_data () |
|
SDL_Surface * | surface () const |
|
SDL_Texture * | texture () const |
|
const std::vector< uint8_t > & | vector () const |
|
uint8_t | at (int i) const |
|
bool | modified () const |
|
bool | is_active () const |
|
void | set_active (bool active) |
|
void | set_data (const std::vector< uint8_t > &data) |
|
void | set_modified (bool modified) |
|
Represents a bitmap image.
The Bitmap
class provides functionality to create, manipulate, and display bitmap images. It supports various operations such as creating a bitmap object, creating and updating textures, applying palettes, and accessing pixel data.
Definition at line 66 of file bitmap.h.