ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
display_buffer.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdarg>
4#include <vector>
5
6#include "display.h"
8
11
12namespace esphome::display {
13
14class DisplayBuffer : public Display {
15 public:
17 int get_width() override;
19 int get_height() override;
20
22 void draw_pixel_at(int x, int y, Color color) override;
23
24 protected:
25 virtual void draw_absolute_pixel_internal(int x, int y, Color color) = 0;
26
27 void init_internal_(uint32_t buffer_length);
28
29 uint8_t *buffer_{nullptr};
30};
31
32} // namespace esphome::display
int get_width() override
Get the width of the image in pixels with rotation applied.
void init_internal_(uint32_t buffer_length)
virtual void draw_absolute_pixel_internal(int x, int y, Color color)=0
int get_height() override
Get the height of the image in pixels with rotation applied.
void draw_pixel_at(int x, int y, Color color) override
Set a single pixel at the specified coordinates to the given color.
static void uint32_t
uint16_t x
Definition tt21100.cpp:5
uint16_t y
Definition tt21100.cpp:6