Small bitmap-library to use with monocrome displays.
TinyBitmap.h@0:f068fae80257, 2017-08-02 (annotated)
- Committer:
- glx
- Date:
- Wed Aug 02 09:13:11 2017 +0000
- Revision:
- 0:f068fae80257
- Child:
- 2:1cc49c9c552e
Initial
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
glx | 0:f068fae80257 | 1 | #ifndef TINYBITMAP_H_ |
glx | 0:f068fae80257 | 2 | #define TINYBITMAP_H_ |
glx | 0:f068fae80257 | 3 | |
glx | 0:f068fae80257 | 4 | class TinyBitmap |
glx | 0:f068fae80257 | 5 | { |
glx | 0:f068fae80257 | 6 | private: |
glx | 0:f068fae80257 | 7 | int _IMAGEWIDTH; |
glx | 0:f068fae80257 | 8 | int _IMAGEHEIGHT; |
glx | 0:f068fae80257 | 9 | int _COMMANDBYTES; |
glx | 0:f068fae80257 | 10 | int _BITMAPLAYOUT; |
glx | 0:f068fae80257 | 11 | |
glx | 0:f068fae80257 | 12 | char Bit0; |
glx | 0:f068fae80257 | 13 | char Bit1; |
glx | 0:f068fae80257 | 14 | char Bit2; |
glx | 0:f068fae80257 | 15 | char Bit3; |
glx | 0:f068fae80257 | 16 | char Bit4; |
glx | 0:f068fae80257 | 17 | char Bit5; |
glx | 0:f068fae80257 | 18 | char Bit6; |
glx | 0:f068fae80257 | 19 | char Bit7; |
glx | 0:f068fae80257 | 20 | |
glx | 0:f068fae80257 | 21 | public: |
glx | 0:f068fae80257 | 22 | TinyBitmap(int width, int height, int commandbytes = 0, int bitmaplayout = 0x00); |
glx | 0:f068fae80257 | 23 | |
glx | 0:f068fae80257 | 24 | void DrawPixel(char *framebuffer, int x, int y); |
glx | 0:f068fae80257 | 25 | void DrawLine(char *framebuffer, int x1, int y1, int x2, int y2); |
glx | 0:f068fae80257 | 26 | void DrawCircle(char *framebuffer, int x, int y, int radius); |
glx | 0:f068fae80257 | 27 | void DrawRectangle(char *framebuffer, int x1, int y1, int x2, int y2); |
glx | 0:f068fae80257 | 28 | void DrawLineDirection(char *framebuffer, int x, int y, int degree, int lenght); |
glx | 0:f068fae80257 | 29 | void DrawText(char *framebuffer, int x, int y, char *CharArray, bool UseLargeFont = false); |
glx | 0:f068fae80257 | 30 | void ClearScreen(char *framebuffer); |
glx | 0:f068fae80257 | 31 | }; |
glx | 0:f068fae80257 | 32 | #endif |