Dont render over the screen edge
This commit is contained in:
@ -679,6 +679,8 @@ int16_t FontRenderer::drawString(std::string_view string, int32_t poX, int32_t p
|
||||
while (n < len) {
|
||||
uint16_t uniCode = decodeUTF8((const uint8_t*)std::begin(string), &n, len - n);
|
||||
sumX += drawChar(uniCode, poX+sumX, poY, color, bgcolor, font);
|
||||
if (poX+sumX > m_tft.width())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user