Theo Bestenlehner / TinyBitmap
Revision:
4:5d6f6e0191b8
Parent:
3:457eaa2c6ed5
--- a/TinyBitmap.h	Wed Aug 02 18:13:39 2017 +0000
+++ b/TinyBitmap.h	Fri Aug 31 15:54:00 2018 +0000
@@ -23,6 +23,7 @@
     int _IMAGEHEIGHT;
     int _COMMANDBYTES;
     int _BITMAPLAYOUT;
+    char *_FRAMEBUFFER;
 
     char Bit0;
     char Bit1;
@@ -34,14 +35,14 @@
     char Bit7;
     
 public:
-    TinyBitmap(int width, int height, int commandbytes = 0, int bitmaplayout = 0x00);//Constructor; creates a bitmap-handler with the given size and layout, can also leave some space for command-bytes to control a display. The bitmap (char[]) itself has to be created seperately.
+    TinyBitmap(int width, int height, char *framebuffer, int commandbytes = 0, int bitmaplayout = 0x00);//Constructor; creates a bitmap-handler with the given size and layout, can also leave some space for command-bytes to control a display. The bitmap (char[]) itself has to be created seperately.
 
-    void DrawPixel(char *framebuffer, int x, int y); //Draws a single pixel
-    void DrawLine(char *framebuffer, int x1, int y1, int x2, int y2);//Draws a line between two points
-    void DrawCircle(char *framebuffer, int x, int y, int radius);//Draws a circle
-    void DrawRectangle(char *framebuffer, int x1, int y1, int x2, int y2); //Draws a rectangle. The coordinates are the opposite corners
-    void DrawLineDirection(char *framebuffer, int x, int y, int degree, int lenght); //Draws a line from a point into a direction with a given length. 0° is from the starting point to the right.
-    void DrawText(char *framebuffer, int x, int y, char *CharArray, bool UseLargeFont = false); //Draws basic text in two different sizes on the given location.
-    void ClearScreen(char *framebuffer); //Clears the content of the bitmap to zeros
+    void DrawPixel(int x, int y); //Draws a single pixel
+    void DrawLine(int x1, int y1, int x2, int y2);//Draws a line between two points
+    void DrawCircle(int x, int y, int radius);//Draws a circle
+    void DrawRectangle(int x1, int y1, int x2, int y2); //Draws a rectangle. The coordinates are the opposite corners
+    void DrawLineDirection(int x, int y, int degree, int lenght); //Draws a line from a point into a direction with a given length. 0° is from the starting point to the right.
+    void DrawText(int x, int y, char *CharArray, bool UseLargeFont = false); //Draws basic text in two different sizes on the given location.
+    void ClearScreen(); //Clears the content of the bitmap to zeros
 };
 #endif
\ No newline at end of file