133 ColorBitness bitness,
bool big_endian,
int x_offset,
int y_offset,
int x_pad) {
140 Hub75PixelFormat format;
141 Hub75ColorOrder color_order = Hub75ColorOrder::RGB;
146 format = Hub75PixelFormat::RGB565;
150#if LV_COLOR_DEPTH == 32
152 format = Hub75PixelFormat::RGB888_32;
158#elif LV_COLOR_DEPTH == 24
160 format = Hub75PixelFormat::RGB888;
164 ESP_LOGE(TAG,
"Unsupported LV_COLOR_DEPTH: %d", LV_COLOR_DEPTH);
169 format = Hub75PixelFormat::RGB888;
174 ESP_LOGE(TAG,
"Unsupported bitness: %d",
static_cast<int>(bitness));
179 const int stride_px = x_offset + w + x_pad;
180 const bool is_packed = (x_offset == 0 && x_pad == 0 && y_offset == 0);
184 driver_->draw_pixels(x_start, y_start, w,
h, ptr, format, color_order, big_endian);
187 for (
int yy = 0; yy <
h; ++yy) {
188 const size_t row_offset = ((y_offset + yy) * stride_px + x_offset) * bytes_per_pixel;
189 const uint8_t *row_ptr = ptr + row_offset;
191 driver_->draw_pixels(x_start, y_start + yy, w, 1, row_ptr, format, color_order, big_endian);