From f049f382f03c946b967e1a53368c82f845299cb4 Mon Sep 17 00:00:00 2001 From: JF Date: Sat, 18 Jan 2020 18:17:52 +0100 Subject: Encapsulate the drawing of the screen into Screens classes. --- src/Components/Gfx/Gfx.cpp | 3 +++ src/Components/Gfx/Gfx.h | 1 + 2 files changed, 4 insertions(+) (limited to 'src/Components/Gfx') diff --git a/src/Components/Gfx/Gfx.cpp b/src/Components/Gfx/Gfx.cpp index 50516f7d..9e680687 100644 --- a/src/Components/Gfx/Gfx.cpp +++ b/src/Components/Gfx/Gfx.cpp @@ -4,6 +4,9 @@ using namespace Pinetime::Components; Gfx::Gfx(Pinetime::Drivers::St7789 &lcd) : lcd{lcd} { +} + +void Gfx::Init() { lcd.Init(); } diff --git a/src/Components/Gfx/Gfx.h b/src/Components/Gfx/Gfx.h index bc450846..9bd07fee 100644 --- a/src/Components/Gfx/Gfx.h +++ b/src/Components/Gfx/Gfx.h @@ -11,6 +11,7 @@ namespace Pinetime { class Gfx { public: explicit Gfx(Drivers::St7789& lcd); + void Init(); void ClearScreen(); void DrawString(uint8_t x, uint8_t y, uint16_t color, const char* text, const FONT_INFO *p_font, bool wrap); void DrawChar(const FONT_INFO *font, uint8_t c, uint8_t *x, uint8_t y, uint16_t color); -- cgit v1.2.3-70-g09d2