119 ColorBitness bitness,
bool big_endian,
int x_offset,
int y_offset,
int x_pad) {
126 Hub75PixelFormat format;
127 Hub75ColorOrder color_order = Hub75ColorOrder::RGB;
132 format = Hub75PixelFormat::RGB565;
136#if LV_COLOR_DEPTH == 32
138 format = Hub75PixelFormat::RGB888_32;
144#elif LV_COLOR_DEPTH == 24
146 format = Hub75PixelFormat::RGB888;
150 ESP_LOGE(TAG,
"Unsupported LV_COLOR_DEPTH: %d", LV_COLOR_DEPTH);
155 format = Hub75PixelFormat::RGB888;
160 ESP_LOGE(TAG,
"Unsupported bitness: %d",
static_cast<int>(bitness));
165 const int stride_px = x_offset + w + x_pad;
166 const bool is_packed = (x_offset == 0 && x_pad == 0 && y_offset == 0);
170 driver_->draw_pixels(x_start, y_start, w,
h, ptr, format, color_order, big_endian);
173 for (
int yy = 0; yy <
h; ++yy) {
174 const size_t row_offset = ((y_offset + yy) * stride_px + x_offset) * bytes_per_pixel;
175 const uint8_t *row_ptr = ptr + row_offset;
177 driver_->draw_pixels(x_start, y_start + yy, w, 1, row_ptr, format, color_order, big_endian);