New design Dual Watch

This commit is contained in:
Armel FAUVEAU
2024-02-17 05:01:13 +01:00
parent 04da5ae1dc
commit f4154dde3a
4 changed files with 158 additions and 40 deletions

View File

@@ -218,6 +218,38 @@ static void sort(int16_t *a, int16_t *b)
}
}
}
void PutPixel(uint8_t x, uint8_t y, bool fill) {
UI_DrawPixelBuffer(gFrameBuffer, x, y, fill);
}
void PutPixelStatus(uint8_t x, uint8_t y, bool fill) {
UI_DrawPixelBuffer(&gStatusLine, x, y, fill);
}
void GUI_DisplaySmallest(const char *pString, uint8_t x, uint8_t y,
bool statusbar, bool fill) {
uint8_t c;
uint8_t pixels;
const uint8_t *p = (const uint8_t *)pString;
while ((c = *p++) && c != '\0') {
c -= 0x20;
for (int i = 0; i < 3; ++i) {
pixels = gFont3x5[c][i];
for (int j = 0; j < 6; ++j) {
if (pixels & 1) {
if (statusbar)
PutPixelStatus(x + i, y + j, fill);
else
PutPixel(x + i, y + j, fill);
}
pixels >>= 1;
}
}
x += 4;
}
}
#endif
void UI_DrawLineBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black)