fix color swap option for rgb displaytext (#21049)

This commit is contained in:
gemu 2024-03-27 16:52:35 +01:00 committed by GitHub
parent aa4bdebe55
commit 72968b9ee8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -1744,6 +1744,9 @@ void uDisplay::drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) {
if (interface == _UDSP_RGB) {
#ifdef USE_ESP32_S3
if (lvgl_param.swap_color) {
color = color << 8 | color >> 8;
}
if (cur_rot > 0) {
while (h--) {
drawPixel_RGB(x , y , color);
@ -1814,6 +1817,9 @@ void uDisplay::drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) {
if (interface == _UDSP_RGB) {
#ifdef USE_ESP32_S3
if (lvgl_param.swap_color) {
color = color << 8 | color >> 8;
}
if (cur_rot > 0) {
while (w--) {
drawPixel_RGB(x , y , color);
@ -2403,6 +2409,9 @@ void uDisplay::drawPixel(int16_t x, int16_t y, uint16_t color) {
#ifdef USE_ESP32_S3
if (interface == _UDSP_RGB) {
if (lvgl_param.swap_color) {
color = color << 8 | color >> 8;
}
drawPixel_RGB(x, y, color);
return;
}