Rihards Balass / 4DGL-mbed-32PTU
Revision:
3:dcfbceb81fef
Parent:
2:81eaaa491a02
Child:
4:50511ed54ab4
diff -r 81eaaa491a02 -r dcfbceb81fef Picaso_4DGL-32PTU.h
--- a/Picaso_4DGL-32PTU.h	Fri Sep 09 06:17:05 2016 +0000
+++ b/Picaso_4DGL-32PTU.h	Fri Sep 09 10:19:54 2016 +0000
@@ -29,32 +29,41 @@
 #define TEMPO 1
 
 // Main Functions values
-#define CLS             0xFFCD
-#define BAUDRATE        0x0026
-#define ORIENTATION     0xFF9E
+#define CLS                 0xFFCD
+#define BAUDRATE            0x0026
+#define ORIENTATION         0xFF9E
 
 // text functions values
-#define TEXT_BG_COLOR   0xFFE6
-#define SET_FONT        0xFFE5
-#define PUT_CHAR        0xFFFE
-#define PUT_STRING      0x0018
-#define MOVE_CURSOR     0xFFE9
-#define TEXT_FG_COLOR   0xFFE7
-#define TEXT_WIDTH      0xFFE4
-#define TEXT_HEIGHT     0xFFE3
-#define TEXT_X_GAP      0xFFE2
-#define TEXT_Y_GAP      0xFFE1
-#define TEXT_BOLD       0xFFDE
-#define TEXT_INVERSE    0xFFDC
-#define TEXT_ITALIC     0xFFDD
-#define TEXT_OPACITY    0xFFDF
-#define TEXT_UNDERLINE  0xFFDB
-#define TEXT_ATTRIBUTES 0xFFDA
+#define TEXT_BG_COLOR      0xFFE6
+#define SET_FONT            0xFFE5
+#define PUT_CHAR            0xFFFE
+#define PUT_STRING          0x0018
+#define MOVE_CURSOR         0xFFE9
+#define TEXT_FG_COLOR       0xFFE7
+#define TEXT_WIDTH          0xFFE4
+#define TEXT_HEIGHT         0xFFE3
+#define TEXT_X_GAP          0xFFE2
+#define TEXT_Y_GAP          0xFFE1
+#define TEXT_BOLD           0xFFDE
+#define TEXT_INVERSE        0xFFDC
+#define TEXT_ITALIC         0xFFDD
+#define TEXT_OPACITY        0xFFDF
+#define TEXT_UNDERLINE      0xFFDB
+#define TEXT_ATTRIBUTES     0xFFDA
 
 // graphics functions values
-#define CHANGE_COLOR    0xFFB4
-#define DRAW_CIRCLE     0xFFC3
-#define DRAW_F_CIRCLE   0xFFC2
+#define CHANGE_COLOR       0xFFB4
+#define DRAW_CIRCLE         0xFFC3
+#define CIRCLE_FILLED       0xFFC2
+#define DRAW_LINE           0xFFC8
+#define DRAW_RECTANGLE      0xFFC5
+#define RECTANGLE_FILLED    0xFFC4
+#define DRAW_POLYLINE       0x0015
+#define DRAW_POLYGON        0x0013
+#define POLYGON_FILLED      0x0014
+#define DRAW_TRIANGLE       0xFFBF
+#define TRIANGLE_FILLED     0xFFA9
+
 
 
 // Screen answers
@@ -103,7 +112,7 @@
 #define BAUD_500000  0x0012
 #define BAUD_600000  0x0013
 
-// Defined Colors
+// Defined colors
 #define Black       0x0000
 #define Navy        0x000F
 #define DGreen      0x03E0
@@ -149,12 +158,12 @@
 
 
 //**************************************************************************
-class TFT_4DGL {
+class PICASO_4DGL {
 
 public :
 
     Serial pc; // serial variable for debug information
-    TFT_4DGL(PinName tx, PinName rx, PinName rst); // LCD serial construnctor
+    PICASO_4DGL(PinName tx, PinName rx, PinName rst); // LCD serial construnctor
     int resp, respLen; // received response from screen
     char response[];
     
@@ -172,6 +181,15 @@
     void cls(); // clear screen
     void changeColor(short, short); // change one color to another
     void drawCircle(short, short, short, short); // draw a circle (x, y, radius, color)
+    void drawFilledCircle(short, short, short, short); // draw a filled circle (x, y, radius, color)
+    void drawLine(short, short, short, short, short); // draw a line (x1, y1, x2, y2, color)
+    void drawRectangle(short, short, short, short, short); // draw a rectangle (x1, y1, x2, y2, color)
+    void drawFilledRectangle(short, short, short, short, short); // draw a solid rectangle (x1, y1, x2, y2, color)
+    void drawPolyline(short, short *, short *, short); // draw multiple lines (n, vx1…vxN, vy1…vyN, color)
+    void drawPolygon(short, short *, short *, short); // draw a polygon (n, vx1…vxN, vy1…vyN, color)
+    void drawFilledPolygon(short, short *, short *, short); // draw a solid polygon (n, vx1…vxN, vy1…vyN, color)
+    void drawTriangle(short, short, short, short, short, short, short); // draw a triangle (x1, y1, x2, y2, x3, y3, color)
+    void drawFilledTriangle(short, short, short, short, short, short, short); // draw a solid triangle (x1, y1, x2, y2, x3, y3, color)
     
 // Texts Commands
     void setFont(char); // set desired font from embedded fonts