ESPHome  2024.5.5
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  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
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
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.
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7