Chris Taylor / Mbed 2 deprecated RETRO-CityRally

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Bitmap1bpp.h Source File

Bitmap1bpp.h

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