components/tft/tft.c

branch
novnc
changeset 38
537ffe280775
parent 29
45647136ec95
child 91
255a75322212
--- a/components/tft/tft.c	Thu May 02 11:57:07 2019 +0200
+++ b/components/tft/tft.c	Thu May 02 17:12:06 2019 +0200
@@ -15,12 +15,10 @@
 #include "tft.h"
 #include "time.h"
 #include <math.h>
-#include "rom/tjpgd.h"
+#include "esp32/rom/tjpgd.h"
 #include "esp_heap_caps.h"
 #include "tftspi.h"
 
-#include "vnc-server.h"
-
 #define DEG_TO_RAD 0.01745329252
 #define RAD_TO_DEG 57.295779513
 #define deg_to_rad 0.01745329252 + 3.14159265359
@@ -139,7 +137,6 @@
 
 	if ((x < dispWin.x1) || (y < dispWin.y1) || (x > dispWin.x2) || (y > dispWin.y2)) return;
 	drawPixel(x, y, color, sel);
-	VncDrawPixel(x, y, VNC_RGB2COL(color.r, color.g, color.b));
 }
 
 //====================================================================
@@ -168,7 +165,6 @@
 	if ((y + h) > (dispWin.y2+1)) h = dispWin.y2 - y + 1;
 	if (h == 0) h = 1;
 	TFT_pushColorRep(x, y, x, y+h-1, color, (uint32_t)h);
-	VncDrawVertLine(x, y, y+h-1, VNC_RGB2COL(color.r, color.g, color.b));
 }
 
 //--------------------------------------------------------------------------
@@ -184,7 +180,6 @@
 	if (w == 0) w = 1;
 
 	TFT_pushColorRep(x, y, x+w-1, y, color, (uint32_t)w);
-	VncDrawHorzLine(x, x+w-1, y, VNC_RGB2COL(color.r, color.g, color.b));
 }
 
 //======================================================================
@@ -287,7 +282,6 @@
 	if (w == 0) w = 1;
 	if (h == 0) h = 1;
 	TFT_pushColorRep(x, y, x+w-1, y+h-1, color, (uint32_t)(h*w));
-	VncFillRect(x, y, x+w-1, y+h-1, VNC_RGB2COL(color.r, color.g, color.b));
 }
 
 //============================================================================
@@ -298,14 +292,12 @@
 //==================================
 void TFT_fillScreen(color_t color) {
 	TFT_pushColorRep(0, 0, _width-1, _height-1, color, (uint32_t)(_height*_width));
-	VncCls(VNC_RGB2COL(color.r, color.g, color.b));
 }
 
 //==================================
 void TFT_fillWindow(color_t color) {
 	TFT_pushColorRep(dispWin.x1, dispWin.y1, dispWin.x2, dispWin.y2,
 			color, (uint32_t)((dispWin.x2-dispWin.x1+1) * (dispWin.y2-dispWin.y1+1)));
-	VncFillRect(dispWin.x1, dispWin.y1, dispWin.x2, dispWin.y2, VNC_RGB2COL(color.r, color.g, color.b));
 }
 
 // ^^^============= Basics drawing functions ================================^^^
@@ -893,9 +885,6 @@
 			// visible pixel
 			bufPos = ((j + fontChar.adjYOffset) * char_width) + (fontChar.xOffset + i);  // bufY + bufX
 			color_line[bufPos] = _fg;
-			VncDrawPixel(x + (fontChar.xOffset + i), y + (j + fontChar.adjYOffset), VNC_RGB2COL(_fg.r, _fg.g, _fg.b));
-		    } else {
-			VncDrawPixel(x + (fontChar.xOffset + i), y + (j + fontChar.adjYOffset), VNC_RGB2COL(_bg.r, _bg.g, _bg.b));
 		    }
 		    mask >>= 1;
 		}
@@ -971,9 +960,6 @@
 		    for (i = 0; i < 8; i++) {
 			if ((ch & mask) !=0) {
 			    color_line[(j*cfont.x_size) + (i+(k*8))] = _fg;
-			    VncDrawPixel(x+i+(k*8), y+j, VNC_RGB2COL(_fg.r, _fg.g, _fg.b));
-			} else {
-			    VncDrawPixel(x+i+(k*8), y+j, VNC_RGB2COL(_bg.r, _bg.g, _bg.b));
 			}
 			mask >>= 1;
 		    }

mercurial