ESPHome 2025.5.0
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 {
13namespace display {
14
15class DisplayBuffer : public Display {
16 public:
18 int get_width() override;
20 int get_height() override;
21
23 void draw_pixel_at(int x, int y, Color color) override;
24
25 protected:
26 virtual void draw_absolute_pixel_internal(int x, int y, Color color) = 0;
27
28 void init_internal_(uint32_t buffer_length);
29
30 uint8_t *buffer_{nullptr};
31};
32
33} // namespace display
34} // namespace esphome
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.
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
uint16_t x
Definition tt21100.cpp:5
uint16_t y
Definition tt21100.cpp:6