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

Embed: (wiki syntax)

« Back to documentation index

BitmapImage Class Reference

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:
tablePointer 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:
tablePointer to the image table.
fg_colorThe 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:
tablePointer to the image table.
fg_colorThe foreground color as a 32-bit ARGB value.
bg_colorThe 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:
cThe 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:
cThe new foreground color as a 32-bit ARGB value.

Definition at line 66 of file BitmapImage.cpp.

int height (  ) [inherited]

Get the image height.

Returns:
The image height.

Definition at line 30 of file Image.cpp.

unsigned int pixel ( int  x,
int  y 
) [virtual]

Get the pixel at the specified coordinates.

Parameters:
xThe X coordinate.
yThe Y coordinate.
Returns:
The color of the pixel as a 32-bit ARGB value.

Implements Image.

Definition at line 40 of file BitmapImage.cpp.

int width (  ) [inherited]

Get the image width.

Returns:
The image width.

Definition at line 25 of file Image.cpp.