diff options
| author | JF <jf@codingfield.com> | 2020-06-07 12:17:45 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2020-06-07 12:17:45 (GMT) |
| commit | a0e73f5c1a1e652aa6270b7e42a73aee3d12ded6 (patch) | |
| tree | 6205dfb543bb22245d39a2f6e44d2c26cb381c10 /src/Components/Gfx/Gfx.cpp | |
| parent | 8a94750e30399bfb204cbec59a769d9d1b6b5baa (diff) | |
| parent | dbdb26ae1fa45cec88f1b9ea0353b3d0a3c39f56 (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/Components/Gfx/Gfx.cpp')
| -rw-r--r-- | src/Components/Gfx/Gfx.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Components/Gfx/Gfx.cpp b/src/Components/Gfx/Gfx.cpp index ed323bc..3c5dbfb 100644 --- a/src/Components/Gfx/Gfx.cpp +++ b/src/Components/Gfx/Gfx.cpp @@ -43,6 +43,20 @@ void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint16_t col WaitTransfertFinished(); } +void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t* b) { + state.remainingIterations = h; + state.currentIteration = 0; + state.busy = true; + state.action = Action::FillRectangle; + state.color = 0x00; + state.taskToNotify = xTaskGetCurrentTaskHandle(); + + lcd.BeginDrawBuffer(x, y, w, h); + lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(b), width * 2); + + WaitTransfertFinished(); +} + void Gfx::DrawString(uint8_t x, uint8_t y, uint16_t color, const char *text, const FONT_INFO *p_font, bool wrap) { if (y > (height - p_font->height)) { // Not enough space to write even single char. |
