From 3af6b4d3f7ff99489f683ddeaa1f992737d9a9b3 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 18 Nov 2023 21:46:06 +0000 Subject: [PATCH] bugfixes --- display.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/display.cpp b/display.cpp index 22bc10d..64c483f 100644 --- a/display.cpp +++ b/display.cpp @@ -74,6 +74,7 @@ void Display::begin(colour_t bg, colour_t fg, orientation_t orient) { #if defined(USE_UTFT) utft.InitLCD(orient); + utft.setBackColor(_bg); _dx = utft.getDisplayXSize(); _dy = utft.getDisplayYSize(); @@ -107,8 +108,7 @@ void Display::begin(colour_t bg, colour_t fg, orientation_t orient) { _dx = canvas.getWidth(); _dy = canvas.getHeight(); - DBG(printf("w %d h %d", _dx, _dy)); - DBG(println()); + DBG(printf("w %d h %d\r\n", _dx, _dy)); #endif setColor(fg); @@ -194,7 +194,7 @@ void Display::drawCircle(unsigned x, unsigned y, unsigned r, colour_t col) { espi.drawCircle(x, y, r, col); #elif defined(USE_VGA) canvas.setPenColor(rgb(col)); - canvas.fillEllipse(x, y, r, r); + canvas.drawEllipse(x, y, r, r); #endif } @@ -208,7 +208,7 @@ void Display::fillCircle(unsigned x, unsigned y, unsigned r, colour_t col) { espi.fillCircle(x, y, r, col); #elif defined(USE_VGA) canvas.setBrushColor(rgb(col)); - canvas.drawEllipse(x, y, r, r); + canvas.fillEllipse(x, y, r, r); #endif } @@ -222,7 +222,7 @@ void Display::drawRectangle(unsigned x, unsigned y, unsigned w, unsigned h, colo espi.drawRect(x, y, w, h, col); #elif defined(USE_VGA) canvas.setPenColor(rgb(col)); - canvas.fillRectangle(x, y, x+w, y+h); + canvas.drawRectangle(x, y, x+w, y+h); #endif } @@ -236,7 +236,7 @@ void Display::fillRectangle(unsigned x, unsigned y, unsigned w, unsigned h, colo espi.fillRect(x, y, w, h, col); #elif defined(USE_VGA) canvas.setBrushColor(rgb(col)); - canvas.drawRectangle(x, y, x+w, y+h); + canvas.fillRectangle(x, y, x+w, y+h); #endif }