134 ColorBitness bitness,
bool big_endian,
int x_offset,
int y_offset,
int x_pad) {
142 Hub75ColorOrder color_order = Hub75ColorOrder::RGB;
147 format = Hub75PixelFormat::RGB565;
151#if LV_COLOR_DEPTH == 32
153 format = Hub75PixelFormat::RGB888_32;
159#elif LV_COLOR_DEPTH == 24
161 format = Hub75PixelFormat::RGB888;
165 ESP_LOGE(TAG,
"Unsupported LV_COLOR_DEPTH: %d", LV_COLOR_DEPTH);
170 format = Hub75PixelFormat::RGB888;
175 ESP_LOGE(TAG,
"Unsupported bitness: %d",
static_cast<int>(bitness));
180 const int stride_px = x_offset + w + x_pad;
181 const bool is_packed = (x_offset == 0 && x_pad == 0 && y_offset == 0);
185 driver_->draw_pixels(x_start, y_start, w,
h, ptr,
format, color_order, big_endian);
188 for (
int yy = 0; yy <
h; ++yy) {
189 const size_t row_offset = ((y_offset + yy) * stride_px + x_offset) * bytes_per_pixel;
190 const uint8_t *row_ptr = ptr + row_offset;
192 driver_->draw_pixels(x_start, y_start + yy, w, 1, row_ptr,
format, color_order, big_endian);