Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: LCD_ST7735/Bitmap2bpp.h
- Revision:
- 0:d85c449aca6d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD_ST7735/Bitmap2bpp.h Wed Jan 28 03:26:07 2015 +0000
@@ -0,0 +1,32 @@
+#ifndef __BITMAP2BPP_H__
+#define __BITMAP2BPP_H__
+
+class Bitmap2bpp
+{
+ public:
+ Bitmap2bpp(const uint8_t *bitmap);
+ Bitmap2bpp(uint16_t width, uint16_t height);
+ ~Bitmap2bpp();
+
+ inline uint16_t getWidth() { return _width; }
+ inline uint16_t getHeight() { return _height; }
+ inline uint16_t getStride() { return _stride; }
+
+ inline uint8_t *getBitmapData() { return _pBitmapData; }
+
+ void clear();
+
+ void setPixel(int16_t x, int16_t y, uint16_t color);
+ void fastHLine(int16_t x1, int16_t x2, int16_t y, uint16_t color);
+ void fastVLine(int16_t y1, int16_t y2, int16_t x, uint16_t color);
+ void drawBitmap(int16_t x, int16_t y, Bitmap2bpp &bmp, uint16_t srcX, uint16_t srcY, uint16_t srcWidth, uint16_t srcHeight, bool transparent);
+
+
+ private:
+ uint16_t _width;
+ uint16_t _height;
+ uint16_t _stride;
+ uint8_t *_pBitmapData;
+};
+
+#endif //__BITMAP2BPP_H__
\ No newline at end of file