OE_BITMAP Class Reference

#include <bitmap.h>

List of all members.


Detailed Description

OE_BITMAP is the standard OpenEm bitmap class.

Note:
Only supports 32-bit mode for now.
Todo:
Add support for more pixel formats (and palette support like in VGA).

Definition at line 15 of file bitmap.h.

Public Member Functions

 OE_BITMAP ()
 Construct empty bitmap with size 0x0.
 ~OE_BITMAP ()
 Free bitmap object and memory it allocated for itself.
void clear_to_black ()
 Clear all bitmap pixels to black color.
void create (uint32 w, uint32 h, uint32 bpp)
 Create bitmap of width w and height h, using bpp bits per pixel.
void destroy ()
 Destroy the bitmap.
void put_pix (uint32 x, uint32 y, uint32 R, uint32 G, uint32 B, uint32 A)
 Put single pixel in a bitmap (slow).
void put_pix (uint32 x, uint32 y, uint32 R, uint32 G, uint32 B)
 Put single pixel in a bitmap (slow).
void put_pix (uint32 x, uint32 y, OE_RGBA RGB)
 Put single pixel in a bitmap (slow).
void put_pix (uint32 x, uint32 y, OE_RGBA *RGB)
 Put single pixel in a bitmap (slow).

Public Attributes

uint32 w
 Bitmap width in pixels.
uint32 h
 Bitmap height in pixels.
uint8 bpp
 Bits per pixel (pixel color format). 32 and 64 are assumed to mean FP.
void * dat
 Data buffer. Actual pixel colors are stored here.


Constructor & Destructor Documentation

OE_BITMAP::OE_BITMAP (  ) 

Construct empty bitmap with size 0x0.

Definition at line 6 of file bitmap.cpp.

OE_BITMAP::~OE_BITMAP (  ) 

Free bitmap object and memory it allocated for itself.

Definition at line 13 of file bitmap.cpp.


Member Function Documentation

void OE_BITMAP::clear_to_black (  ) 

Clear all bitmap pixels to black color.

Definition at line 36 of file bitmap.cpp.

Referenced by create().

void OE_BITMAP::create ( uint32  w,
uint32  h,
uint32  bpp 
)

Create bitmap of width w and height h, using bpp bits per pixel.

Definition at line 18 of file bitmap.cpp.

void OE_BITMAP::destroy (  ) 

Destroy the bitmap.

Frees memory allocated to the internal pixel map.

Definition at line 27 of file bitmap.cpp.

Referenced by create(), and ~OE_BITMAP().

void OE_BITMAP::put_pix ( uint32  x,
uint32  y,
uint32  R,
uint32  G,
uint32  B,
uint32  A 
)

Put single pixel in a bitmap (slow).

Definition at line 45 of file bitmap.cpp.

void OE_BITMAP::put_pix ( uint32  x,
uint32  y,
uint32  R,
uint32  G,
uint32  B 
)

Put single pixel in a bitmap (slow).

Definition at line 57 of file bitmap.cpp.

void OE_BITMAP::put_pix ( uint32  x,
uint32  y,
OE_RGBA  RGB 
)

Put single pixel in a bitmap (slow).

Definition at line 69 of file bitmap.cpp.

void OE_BITMAP::put_pix ( uint32  x,
uint32  y,
OE_RGBA RGB 
)

Put single pixel in a bitmap (slow).

Definition at line 81 of file bitmap.cpp.


Member Data Documentation

uint32 OE_BITMAP::w

Bitmap width in pixels.

Definition at line 41 of file bitmap.h.

Referenced by destroy(), OE_BITMAP(), and put_pix().

uint32 OE_BITMAP::h

Bitmap height in pixels.

Definition at line 42 of file bitmap.h.

Referenced by destroy(), and OE_BITMAP().

uint8 OE_BITMAP::bpp

Bits per pixel (pixel color format). 32 and 64 are assumed to mean FP.

Definition at line 43 of file bitmap.h.

Referenced by destroy(), and OE_BITMAP().

void* OE_BITMAP::dat

Data buffer. Actual pixel colors are stored here.

Definition at line 44 of file bitmap.h.

Referenced by clear_to_black(), create(), destroy(), OE_BITMAP(), and put_pix().


The documentation for this class was generated from the following files:
Generated on Sat Sep 9 03:50:50 2006 for Openem APIs by  doxygen 1.4.7