summaryrefslogtreecommitdiff
path: root/src/components/gfx/Gfx.cpp
diff options
context:
space:
mode:
authorNiall Cooling <niallcooling@gmail.com>2021-03-22 17:23:49 +0000
committerNiall Cooling <niallcooling@gmail.com>2021-03-22 17:23:49 +0000
commite5e3fc02b8a2adf9ea100c162d1290cecdf617ef (patch)
tree78d4da0239ff8bf7a8694c28f804f81d2496979f /src/components/gfx/Gfx.cpp
parent14bd790701f4e2f6d75ef8a1f52b9f38023c2dd9 (diff)
parent9f9d0eb5df8ff86b9cd1e095afa3159094dde53c (diff)
Updated to include WatchFaceAnalog and fixed clashes
Diffstat (limited to 'src/components/gfx/Gfx.cpp')
-rw-r--r--src/components/gfx/Gfx.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/components/gfx/Gfx.cpp b/src/components/gfx/Gfx.cpp
index 59c1da9b..59fa8164 100644
--- a/src/components/gfx/Gfx.cpp
+++ b/src/components/gfx/Gfx.cpp
@@ -17,9 +17,8 @@ void Gfx::ClearScreen() {
state.busy = true;
state.action = Action::FillRectangle;
state.taskToNotify = xTaskGetCurrentTaskHandle();
-
- lcd.BeginDrawBuffer(0, 0, width, height);
- lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(buffer), width * 2);
+
+ lcd.DrawBuffer(0, 0, width, height, reinterpret_cast<const uint8_t *>(buffer), width * 2);
WaitTransferFinished();
}
@@ -34,8 +33,7 @@ void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint16_t col
state.color = color;
state.taskToNotify = xTaskGetCurrentTaskHandle();
- lcd.BeginDrawBuffer(x, y, w, h);
- lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(buffer), width * 2);
+ lcd.DrawBuffer(x, y, w, h, reinterpret_cast<const uint8_t *>(buffer), width * 2);
WaitTransferFinished();
}
@@ -48,8 +46,7 @@ void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t* b)
state.color = 0x00;
state.taskToNotify = xTaskGetCurrentTaskHandle();
- lcd.BeginDrawBuffer(x, y, w, h);
- lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(b), width * 2);
+ lcd.DrawBuffer(x, y, w, h, reinterpret_cast<const uint8_t *>(b), width * 2);
WaitTransferFinished();
}
@@ -120,8 +117,7 @@ void Gfx::DrawChar(const FONT_INFO *font, uint8_t c, uint8_t *x, uint8_t y, uint
state.color = color;
state.taskToNotify = xTaskGetCurrentTaskHandle();
- lcd.BeginDrawBuffer(*x, y, bytes_in_line*8, font->height);
- lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(&buffer), bytes_in_line*8*2);
+ lcd.DrawBuffer(*x, y, bytes_in_line*8, font->height, reinterpret_cast<const uint8_t *>(&buffer), bytes_in_line*8*2);
WaitTransferFinished();
*x += font->charInfo[char_idx].widthBits + font->spacePixels;