Chris Taylor / Mbed 2 deprecated RETRO-CityRally

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Bitmap4bpp.h Source File

Bitmap4bpp.h

00001 #ifndef __BITMAP4BPP_H__
00002 #define __BITMAP4BPP_H__
00003 
00004 class Bitmap4bpp
00005 {
00006     public:
00007         Bitmap4bpp(uint16_t width, uint16_t height);
00008         ~Bitmap4bpp();
00009         
00010         inline uint16_t getWidth() { return _width; }
00011         inline uint16_t getHeight() { return _height; }
00012         inline uint16_t getStride() { return _stride; }
00013         
00014         inline uint8_t *getBitmapData() { return _pBitmapData; }
00015                 
00016         void clear();
00017         void setPixel(int16_t x, int16_t y, uint16_t color);
00018     private:
00019         uint16_t    _width;
00020         uint16_t    _height;
00021         uint16_t    _stride;
00022         uint8_t     *_pBitmapData;                
00023 };
00024 
00025 #endif //__BITMAP4BPP_H__