122 ColorBitness bitness,
bool big_endian,
int x_offset,
int y_offset,
int x_pad) {
129 Hub75PixelFormat format;
130 Hub75ColorOrder color_order = Hub75ColorOrder::RGB;
135 format = Hub75PixelFormat::RGB565;
139#if LV_COLOR_DEPTH == 32
141 format = Hub75PixelFormat::RGB888_32;
147#elif LV_COLOR_DEPTH == 24
149 format = Hub75PixelFormat::RGB888;
153 ESP_LOGE(TAG,
"Unsupported LV_COLOR_DEPTH: %d", LV_COLOR_DEPTH);
158 format = Hub75PixelFormat::RGB888;
163 ESP_LOGE(TAG,
"Unsupported bitness: %d",
static_cast<int>(bitness));
168 const int stride_px = x_offset + w + x_pad;
169 const bool is_packed = (x_offset == 0 && x_pad == 0 && y_offset == 0);
173 driver_->draw_pixels(x_start, y_start, w,
h, ptr, format, color_order, big_endian);
176 for (
int yy = 0; yy <
h; ++yy) {
177 const size_t row_offset = ((y_offset + yy) * stride_px + x_offset) * bytes_per_pixel;
178 const uint8_t *row_ptr = ptr + row_offset;
180 driver_->draw_pixels(x_start, y_start + yy, w, 1, row_ptr, format, color_order, big_endian);