WoopsiGfx 1.4
Nintendo DS 2D Graphics Library
Public Member Functions
WoopsiGfx::BitmapBase Class Reference

#include <libwoopsigfx/include/bitmapbase.h>

Inheritance diagram for WoopsiGfx::BitmapBase:
WoopsiGfx::BitmapWrapper WoopsiGfx::MutableBitmapBase WoopsiGfx::Bitmap WoopsiGfx::BufferedBitmap WoopsiGfx::FrameBuffer

List of all members.

Public Member Functions

virtual ~BitmapBase ()
virtual const u16 * getData () const =0
virtual const u16 * getData (s16 x, s16 y) const =0
virtual const u16 getPixel (s16 x, s16 y) const =0
virtual void copy (s16 x, s16 y, u32 size, u16 *dest) const =0
virtual const u16 getWidth () const =0
virtual const u16 getHeight () const =0

Detailed Description

Abstract class defining the basic properties of a bitmap. Since the DS has 16-bit displays (1 alpha bit and 5 bits each for RGB), all bitmaps must expose their data in the same format.

However, since this class does not define how the data is stored, it is possible for a subclass to store the bitmap data in whatever format necessary (1, 2, 4, 8, 24 or 32-bits, or any format at all) as long as it translates back to the DS' native 16-bit format when accessed externally.


Constructor & Destructor Documentation

virtual WoopsiGfx::BitmapBase::~BitmapBase ( ) [inline, virtual]

Destructor.


Member Function Documentation

virtual void WoopsiGfx::BitmapBase::copy ( s16  x,
s16  y,
u32  size,
u16 *  dest 
) const [pure virtual]

Copies data from the supplied co-ordinates sequentially into dest. If the amount to be copied exceeds the available width of the bitmap, copying will wrap around from the right-hand edge of the bitmap to the left-hand edge. The dest parameter must point to an area of memory large enough to contain the copied data.

Parameters:
xThe x co-ordinate to copy from.
yThe y co-ordinate to copy from.
sizeThe number of pixels to copy.
destPointer to the memory that will be copied into.

Implemented in WoopsiGfx::Bitmap, WoopsiGfx::BitmapWrapper, WoopsiGfx::BufferedBitmap, and WoopsiGfx::FrameBuffer.

virtual const u16* WoopsiGfx::BitmapBase::getData ( ) const [pure virtual]

Get a pointer to the internal bitmap data.

Returns:
Pointer to the internal bitmap data.

Implemented in WoopsiGfx::Bitmap, WoopsiGfx::BitmapWrapper, WoopsiGfx::BufferedBitmap, and WoopsiGfx::FrameBuffer.

virtual const u16* WoopsiGfx::BitmapBase::getData ( s16  x,
s16  y 
) const [pure virtual]

Get a pointer to the internal bitmap data at the specified co-ordinates.

Parameters:
xThe x co-ord of the data.
yThe y co-ord of the data.
Returns:
Pointer to the internal bitmap data.

Implemented in WoopsiGfx::Bitmap, WoopsiGfx::BitmapWrapper, WoopsiGfx::BufferedBitmap, and WoopsiGfx::FrameBuffer.

virtual const u16 WoopsiGfx::BitmapBase::getHeight ( ) const [pure virtual]

Get the bitmap's height.

Returns:
The bitmap's height.

Implemented in WoopsiGfx::Bitmap, WoopsiGfx::BitmapWrapper, WoopsiGfx::BufferedBitmap, and WoopsiGfx::FrameBuffer.

virtual const u16 WoopsiGfx::BitmapBase::getPixel ( s16  x,
s16  y 
) const [pure virtual]

Get the colour of the pixel at the specified co-ordinates

Parameters:
xThe x co-ordinate of the pixel.
yThe y co-ordinate of the pixel.
Returns:
The colour of the pixel.

Implemented in WoopsiGfx::Bitmap, WoopsiGfx::BitmapWrapper, WoopsiGfx::BufferedBitmap, and WoopsiGfx::FrameBuffer.

virtual const u16 WoopsiGfx::BitmapBase::getWidth ( ) const [pure virtual]

Get the bitmap's width.

Returns:
The bitmap's width.

Implemented in WoopsiGfx::Bitmap, WoopsiGfx::BitmapWrapper, WoopsiGfx::BufferedBitmap, and WoopsiGfx::FrameBuffer.


The documentation for this class was generated from the following file: