Woopsi 1.3
Nintendo DS Gui Framework
Public Member Functions | Protected Member Functions | Protected Attributes
WoopsiUI::BitmapWrapper Class Reference

#include <libwoopsi/include/bitmapwrapper.h>

Inheritance diagram for WoopsiUI::BitmapWrapper:

List of all members.

Public Member Functions

 BitmapWrapper (const u16 *data, u16 width, u16 height)
virtual ~BitmapWrapper ()
const u16 getPixel (s16 x, s16 y) const
const u16 * getData () const
const u16 * getData (s16 x, s16 y) const
void copy (s16 x, s16 y, u32 size, u16 *dest) const
const u16 getWidth () const
const u16 getHeight () const

Protected Member Functions

const u16 *_bitmap __attribute__ ((aligned(4)))
 BitmapWrapper (const BitmapWrapper &bitmap)

Protected Attributes

u16 _width
u16 _height

Detailed Description

Class designed to wrap raw u16* data within a bitmap object. This enables the data to be accessed just like any other bitmap object. Since raw u16* data should be const, the bitmap is read-only.

Constructor & Destructor Documentation

WoopsiUI::BitmapWrapper::BitmapWrapper ( const u16 *  data,
u16  width,
u16  height 


dataPointer to the raw bitmap data.
widthThe width of the bitmap.
heightThe height of the bitmap.
virtual WoopsiUI::BitmapWrapper::~BitmapWrapper ( ) [inline, virtual]


WoopsiUI::BitmapWrapper::BitmapWrapper ( const BitmapWrapper bitmap) [inline, protected]

Copy constructor is protected to prevent usage.

Member Function Documentation

const u16* _bitmap WoopsiUI::BitmapWrapper::__attribute__ ( (aligned(4))  ) [protected]
void WoopsiUI::BitmapWrapper::copy ( s16  x,
s16  y,
u32  size,
u16 *  dest 
) const [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.

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.

Implements WoopsiUI::BitmapBase.

const u16* WoopsiUI::BitmapWrapper::getData ( ) const [inline, virtual]

Get a pointer to the internal bitmap.

Pointer to the internal bitmap.

Implements WoopsiUI::BitmapBase.

const u16* WoopsiUI::BitmapWrapper::getData ( s16  x,
s16  y 
) const [virtual]

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

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

Implements WoopsiUI::BitmapBase.

const u16 WoopsiUI::BitmapWrapper::getHeight ( ) const [inline, virtual]

Get the bitmap's height.

The bitmap's height.

Implements WoopsiUI::BitmapBase.

const u16 WoopsiUI::BitmapWrapper::getPixel ( s16  x,
s16  y 
) const [virtual]

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

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

Implements WoopsiUI::BitmapBase.

const u16 WoopsiUI::BitmapWrapper::getWidth ( ) const [inline, virtual]

Get the bitmap's width.

The bitmap's width.

Implements WoopsiUI::BitmapBase.

Member Data Documentation

Height of the bitmap

Width of the bitmap

The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator