A simple yet powerful library for controlling graphical displays. Multiple display controllers are supported using inheritance.
Dependents: mbed_rifletool Hexi_Bubble_Game Hexi_Catch-the-dot_Game Hexi_Acceleromagnetic_Synth
BitmapImage Class Reference
BitmapImage class. More...
#include <BitmapImage.h>
Inherits Image.
Public Member Functions | |
BitmapImage (const char *table) | |
Create a BitmapImage object from the specified image table with a white foreground, and an alpha background. | |
BitmapImage (const char *table, unsigned int fg_color) | |
Create a BitmapImage object from the specified image table with the specified foreground, and an alpha background. | |
BitmapImage (const char *table, unsigned int fg_color, unsigned int bg_color) | |
Create a BitmapImage object from the specified image table with the specified foreground and background colors. | |
virtual unsigned int | pixel (int x, int y) |
Get the pixel at the specified coordinates. | |
unsigned int | foreground () |
Get the foreground color. | |
void | foreground (unsigned int c) |
Set the foreground color. | |
unsigned int | background () |
Get the background color. | |
void | background (unsigned int c) |
Set the background color. | |
int | width () |
Get the image width. | |
int | height () |
Get the image height. |
Detailed Description
BitmapImage class.
Used to access a monochrome bitmap stored in an external table.
Definition at line 26 of file BitmapImage.h.
Constructor & Destructor Documentation
BitmapImage | ( | const char * | table ) |
Create a BitmapImage object from the specified image table with a white foreground, and an alpha background.
- Parameters:
-
table Pointer to the image table.
Definition at line 19 of file BitmapImage.cpp.
BitmapImage | ( | const char * | table, |
unsigned int | fg_color | ||
) |
Create a BitmapImage object from the specified image table with the specified foreground, and an alpha background.
- Parameters:
-
table Pointer to the image table. fg_color The foreground color as a 32-bit ARGB value.
Definition at line 26 of file BitmapImage.cpp.
BitmapImage | ( | const char * | table, |
unsigned int | fg_color, | ||
unsigned int | bg_color | ||
) |
Create a BitmapImage object from the specified image table with the specified foreground and background colors.
- Parameters:
-
table Pointer to the image table. fg_color The foreground color as a 32-bit ARGB value. bg_color The background color as a 32-bit ARGB value.
Definition at line 33 of file BitmapImage.cpp.
Member Function Documentation
unsigned int background | ( | ) |
Get the background color.
- Returns:
- The background color as a 32-bit ARGB value.
Definition at line 71 of file BitmapImage.cpp.
void background | ( | unsigned int | c ) |
Set the background color.
- Parameters:
-
c The new background color as a 32-bit ARGB value.
Definition at line 76 of file BitmapImage.cpp.
unsigned int foreground | ( | ) |
Get the foreground color.
- Returns:
- The foreground color as a 32-bit ARGB value.
Definition at line 61 of file BitmapImage.cpp.
void foreground | ( | unsigned int | c ) |
Set the foreground color.
- Parameters:
-
c The new foreground color as a 32-bit ARGB value.
Definition at line 66 of file BitmapImage.cpp.
int height | ( | ) | [inherited] |
unsigned int pixel | ( | int | x, |
int | y | ||
) | [virtual] |
Get the pixel at the specified coordinates.
- Parameters:
-
x The X coordinate. y The Y coordinate.
- Returns:
- The color of the pixel as a 32-bit ARGB value.
Implements Image.
Definition at line 40 of file BitmapImage.cpp.
Generated on Tue Jul 12 2022 20:26:18 by 1.7.2