ESPHome  2024.2.1
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"
7 #include "display_color_utils.h"
8 
10 #include "esphome/core/defines.h"
11 
12 namespace esphome {
13 namespace display {
14 
15 class 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  virtual int get_height_internal() = 0;
26  virtual int get_width_internal() = 0;
27 
28  protected:
29  virtual void draw_absolute_pixel_internal(int x, int y, Color color) = 0;
30 
31  void init_internal_(uint32_t buffer_length);
32 
33  uint8_t *buffer_{nullptr};
34 };
35 
36 } // namespace display
37 } // namespace esphome
virtual void draw_absolute_pixel_internal(int x, int y, Color color)=0
int get_width() override
Get the width of the image in pixels with rotation applied.
uint16_t x
Definition: tt21100.cpp:17
virtual int get_width_internal()=0
uint16_t y
Definition: tt21100.cpp:18
void init_internal_(uint32_t buffer_length)
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.
virtual int get_height_internal()=0
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7