ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
display.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdarg>
4#include <utility>
5#include <vector>
6
7#include "rect.h"
8
13#include "esphome/core/time.h"
14#include "esphome/core/log.h"
15#include "display_color_utils.h"
16
17#ifdef USE_GRAPH
19#endif
20
21#ifdef USE_QR_CODE
23#endif
24
25#ifdef USE_GRAPHICAL_DISPLAY_MENU
27#endif
28
29namespace esphome::display {
30
81
129
135
142
144constexpr bool rotation_swaps_axes(DisplayRotation rotation) {
145 return rotation == DISPLAY_ROTATION_90_DEGREES || rotation == DISPLAY_ROTATION_270_DEGREES;
146}
147
148const int EDGES_TRIGON = 3;
149const int EDGES_TRIANGLE = 3;
150const int EDGES_TETRAGON = 4;
152const int EDGES_PENTAGON = 5;
153const int EDGES_HEXAGON = 6;
154const int EDGES_HEPTAGON = 7;
155const int EDGES_OCTAGON = 8;
156const int EDGES_NONAGON = 9;
157const int EDGES_ENNEAGON = 9;
158const int EDGES_DECAGON = 10;
159const int EDGES_HENDECAGON = 11;
160const int EDGES_DODECAGON = 12;
161const int EDGES_TRIDECAGON = 13;
162const int EDGES_TETRADECAGON = 14;
163const int EDGES_PENTADECAGON = 15;
164const int EDGES_HEXADECAGON = 16;
165
166const float ROTATION_0_DEGREES = 0.0;
167const float ROTATION_45_DEGREES = 45.0;
168const float ROTATION_90_DEGREES = 90.0;
169const float ROTATION_180_DEGREES = 180.0;
170const float ROTATION_270_DEGREES = 270.0;
171
176
181
182class Display;
183class DisplayPage;
184
196template<typename T> class DisplayWriter {
197 public:
199
200 // For stateless lambdas (convertible to function pointer): use function pointer (4 bytes)
201 template<typename F>
203 requires std::invocable<F, T &> && std::convertible_to<F, void (*)(T &)>
205 this->stateless_f_ = f; // Implicit conversion to function pointer
206 }
207
208 // For stateful lambdas and std::function (not convertible to function pointer): use std::function* (heap allocated)
209 // This handles backwards compatibility with external components
210 template<typename F>
212 requires std::invocable<F, T &> && (!std::convertible_to<F, void (*)(T &)>)
213 : type_(LAMBDA) {
214 this->f_ = new std::function<void(T &)>(std::move(f));
215 }
216
217 // Copy constructor
218 DisplayWriter(const DisplayWriter &other) : type_(other.type_) {
219 if (type_ == LAMBDA) {
220 this->f_ = new std::function<void(T &)>(*other.f_);
221 } else if (type_ == STATELESS_LAMBDA) {
222 this->stateless_f_ = other.stateless_f_;
223 }
224 }
225
226 // Move constructor
227 DisplayWriter(DisplayWriter &&other) noexcept : type_(other.type_) {
228 if (type_ == LAMBDA) {
229 this->f_ = other.f_;
230 other.f_ = nullptr;
231 } else if (type_ == STATELESS_LAMBDA) {
232 this->stateless_f_ = other.stateless_f_;
233 }
234 other.type_ = NONE;
235 }
236
237 // Assignment operators
239 if (this != &other) {
240 this->~DisplayWriter();
241 new (this) DisplayWriter(other);
242 }
243 return *this;
244 }
245
247 if (this != &other) {
248 this->~DisplayWriter();
249 new (this) DisplayWriter(std::move(other));
250 }
251 return *this;
252 }
253
254 // Inline: otherwise moving a writer emits an out of line destructor per display type
255 ESPHOME_ALWAYS_INLINE ~DisplayWriter() {
256 if (type_ == LAMBDA) {
257 delete this->f_;
258 }
259 // STATELESS_LAMBDA/NONE: no cleanup needed (function pointer or empty)
260 }
261
262 bool has_value() const { return this->type_ != NONE; }
263
264 void call(T &display) const {
265 switch (this->type_) {
266 case STATELESS_LAMBDA:
267 this->stateless_f_(display); // Direct function pointer call
268 break;
269 case LAMBDA:
270 (*this->f_)(display); // std::function call
271 break;
272 case NONE:
273 default:
274 break;
275 }
276 }
277
278 // Operator() for convenience
279 void operator()(T &display) const { this->call(display); }
280
281 // Operator* for backwards compatibility with (*writer_)(*this) pattern
282 DisplayWriter &operator*() { return *this; }
283 const DisplayWriter &operator*() const { return *this; }
284
285 protected:
286 enum : uint8_t {
290 } type_;
291
292 union {
293 std::function<void(T &)> *f_;
294 void (*stateless_f_)(T &);
295 };
296};
297
298// Type alias for Display writer - uses optimized DisplayWriter instead of std::function
300
301// Callers usually pass `this`; checking a copy keeps GCC's -Wnonnull-compare quiet.
302#define LOG_DISPLAY(prefix, type, obj) \
303 if (auto *log_display_obj = (obj); log_display_obj != nullptr) { \
304 ESP_LOGCONFIG(TAG, \
305 prefix type "\n" \
306 "%s Rotations: %d °\n" \
307 "%s Dimensions: %dpx x %dpx", \
308 prefix, log_display_obj->get_rotation(), prefix, log_display_obj->get_width(), \
309 log_display_obj->get_height()); \
310 }
311
313inline constexpr Color COLOR_OFF(0, 0, 0, 0);
315inline constexpr Color COLOR_ON(255, 255, 255, 255);
316
318 public:
319 virtual void draw(int x, int y, Display *display, Color color_on, Color color_off) = 0;
320 virtual int get_width() const = 0;
321 virtual int get_height() const = 0;
322};
323
324class BaseFont {
325 public:
326 virtual void print(int x, int y, Display *display, Color color, const char *text, Color background) = 0;
327 virtual void measure(const char *str, int *width, int *x_offset, int *baseline, int *height) = 0;
328};
329
330class Display : public PollingComponent {
331 public:
333 virtual void fill(Color color);
335 virtual void clear();
336
338 virtual int get_width() { return this->get_width_internal(); }
340 virtual int get_height() { return this->get_height_internal(); }
341
343 int get_native_width() { return this->get_width_internal(); }
345 int get_native_height() { return this->get_height_internal(); }
346
348 inline void draw_pixel_at(int x, int y) { this->draw_pixel_at(x, y, COLOR_ON); }
349
351 virtual void draw_pixel_at(int x, int y, Color color) = 0;
352
372 void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness, bool big_endian,
373 int x_offset, int y_offset, int x_pad) {
374 this->draw_pixels_internal(x_start, y_start, w, h, ptr, bitness, big_endian, x_offset, y_offset, x_pad);
375 }
376
378 void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness,
379 bool big_endian) {
380 this->draw_pixels_internal(x_start, y_start, w, h, ptr, bitness, big_endian, 0, 0, 0);
381 }
382
383 // Remove before 2027.5.0
390 "Pixels are always RGB: call draw_pixels_at() without the ColorOrder, and override draw_pixels_internal() "
391 "to copy blocks. Removed in 2027.5.0",
392 "2026.11.0")
393 virtual void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorOrder order,
394 ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad);
395
396 // Remove before 2027.5.0
397 ESPDEPRECATED("Pixels are always RGB, drop the ColorOrder argument. Removed in 2027.5.0", "2026.11.0")
398 void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorOrder order,
399 ColorBitness bitness, bool big_endian) {
400#pragma GCC diagnostic push
401#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
402 this->draw_pixels_at(x_start, y_start, w, h, ptr, order, bitness, big_endian, 0, 0, 0);
403#pragma GCC diagnostic pop
404 }
405
407 void line(int x1, int y1, int x2, int y2, Color color = COLOR_ON);
408
410 void line_at_angle(int x, int y, int angle, int length, Color color = COLOR_ON);
411
414 void line_at_angle(int x, int y, int angle, int start_radius, int stop_radius, Color color = COLOR_ON);
415
417 void horizontal_line(int x, int y, int width, Color color = COLOR_ON);
418
420 void vertical_line(int x, int y, int height, Color color = COLOR_ON);
421
424 void rectangle(int x1, int y1, int width, int height, Color color = COLOR_ON);
425
427 void filled_rectangle(int x1, int y1, int width, int height, Color color = COLOR_ON);
428
430 void circle(int center_x, int center_xy, int radius, Color color = COLOR_ON);
431
433 void filled_circle(int center_x, int center_y, int radius, Color color = COLOR_ON);
434
437 void filled_ring(int center_x, int center_y, int radius1, int radius2, Color color = COLOR_ON);
440 void filled_gauge(int center_x, int center_y, int radius1, int radius2, int progress, Color color = COLOR_ON);
441
443 void triangle(int x1, int y1, int x2, int y2, int x3, int y3, Color color = COLOR_ON);
444
446 void filled_triangle(int x1, int y1, int x2, int y2, int x3, int y3, Color color = COLOR_ON);
447
456 void get_regular_polygon_vertex(int vertex_id, int *vertex_x, int *vertex_y, int center_x, int center_y, int radius,
457 int edges, RegularPolygonVariation variation = VARIATION_POINTY_TOP,
458 float rotation_degrees = ROTATION_0_DEGREES);
459
466 void regular_polygon(int x, int y, int radius, int edges, RegularPolygonVariation variation = VARIATION_POINTY_TOP,
467 float rotation_degrees = ROTATION_0_DEGREES, Color color = COLOR_ON,
468 RegularPolygonDrawing drawing = DRAWING_OUTLINE);
469 void regular_polygon(int x, int y, int radius, int edges, RegularPolygonVariation variation, Color color,
470 RegularPolygonDrawing drawing = DRAWING_OUTLINE);
471 void regular_polygon(int x, int y, int radius, int edges, Color color,
472 RegularPolygonDrawing drawing = DRAWING_OUTLINE);
473
478 void filled_regular_polygon(int x, int y, int radius, int edges,
479 RegularPolygonVariation variation = VARIATION_POINTY_TOP,
480 float rotation_degrees = ROTATION_0_DEGREES, Color color = COLOR_ON);
481 void filled_regular_polygon(int x, int y, int radius, int edges, RegularPolygonVariation variation, Color color);
482 void filled_regular_polygon(int x, int y, int radius, int edges, Color color);
483
494 void print(int x, int y, BaseFont *font, Color color, TextAlign align, const char *text,
495 Color background = COLOR_OFF);
496
506 void print(int x, int y, BaseFont *font, Color color, const char *text, Color background = COLOR_OFF);
507
516 void print(int x, int y, BaseFont *font, TextAlign align, const char *text);
517
525 void print(int x, int y, BaseFont *font, const char *text);
526
538 void printf(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format, ...)
539 __attribute__((format(printf, 8, 9)));
540
551 void printf(int x, int y, BaseFont *font, Color color, TextAlign align, const char *format, ...)
552 __attribute__((format(printf, 7, 8)));
553
563 void printf(int x, int y, BaseFont *font, Color color, const char *format, ...) __attribute__((format(printf, 6, 7)));
564
574 void printf(int x, int y, BaseFont *font, TextAlign align, const char *format, ...)
575 __attribute__((format(printf, 6, 7)));
576
585 void printf(int x, int y, BaseFont *font, const char *format, ...) __attribute__((format(printf, 5, 6)));
586
598 void strftime(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format,
599 ESPTime time) __attribute__((format(strftime, 8, 0)));
600
611 void strftime(int x, int y, BaseFont *font, Color color, TextAlign align, const char *format, ESPTime time)
612 __attribute__((format(strftime, 7, 0)));
613
623 void strftime(int x, int y, BaseFont *font, Color color, const char *format, ESPTime time)
624 __attribute__((format(strftime, 6, 0)));
625
635 void strftime(int x, int y, BaseFont *font, TextAlign align, const char *format, ESPTime time)
636 __attribute__((format(strftime, 6, 0)));
637
646 void strftime(int x, int y, BaseFont *font, const char *format, ESPTime time) __attribute__((format(strftime, 5, 0)));
647
656 void image(int x, int y, BaseImage *image, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
657
667 void image(int x, int y, BaseImage *image, ImageAlign align, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
668
669#ifdef USE_GRAPH
677 void graph(int x, int y, graph::Graph *graph, Color color_on = COLOR_ON);
678
690 void legend(int x, int y, graph::Graph *graph, Color color_on = COLOR_ON);
691#endif // USE_GRAPH
692
693#ifdef USE_QR_CODE
701 void qr_code(int x, int y, qr_code::QrCode *qr_code, Color color_on = COLOR_ON, int scale = 1);
702#endif
703
704#ifdef USE_GRAPHICAL_DISPLAY_MENU
712 void menu(int x, int y, graphical_display_menu::GraphicalDisplayMenu *menu, int width, int height);
713#endif // USE_GRAPHICAL_DISPLAY_MENU
714
727 void get_text_bounds(int x, int y, const char *text, BaseFont *font, TextAlign align, int *x1, int *y1, int *width,
728 int *height);
729
731 void set_writer(display_writer_t &&writer) { this->writer_ = std::move(writer); }
732
733 void show_page(DisplayPage *page);
734 void show_next_page();
735 void show_prev_page();
736
737 void set_pages(std::vector<DisplayPage *> pages);
738
739 const DisplayPage *get_active_page() const { return this->page_; }
740
741#ifdef DISPLAY_PAGE_CHANGE_CALLBACK_COUNT
742 template<typename F> void add_on_page_change_callback(F &&callback) {
743 this->page_change_callback_.add(std::forward<F>(callback));
744 }
745#endif
746
748 virtual void set_rotation(DisplayRotation rotation) { this->rotation_ = rotation; }
749
750 // Internal method to set display auto clearing.
751 void set_auto_clear(bool auto_clear_enabled) { this->auto_clear_enabled_ = auto_clear_enabled; }
752
753 virtual DisplayRotation get_rotation() const { return this->rotation_; }
754
759 virtual bool pixel_axes_swapped() const { return rotation_swaps_axes(this->rotation_); }
760
765
772 void start_clipping(Rect rect);
773 void start_clipping(int16_t left, int16_t top, int16_t right, int16_t bottom) {
774 start_clipping(Rect(left, top, right - left, bottom - top));
775 };
776
782 void extend_clipping(Rect rect);
783 void extend_clipping(int16_t left, int16_t top, int16_t right, int16_t bottom) {
784 this->extend_clipping(Rect(left, top, right - left, bottom - top));
785 };
786
792 void shrink_clipping(Rect rect);
793 void shrink_clipping(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) {
794 this->shrink_clipping(Rect(left, top, right - left, bottom - top));
795 };
796
799 void end_clipping();
800
805 Rect get_clipping() const;
806
807 bool is_clipping() const { return !this->clipping_rectangle_.empty(); }
808
812 bool ESPHOME_ALWAYS_INLINE is_point_clipped(int x, int y) const {
813 return this->is_clipping() && !this->clipping_rectangle_.back().inside(x, y);
814 }
815
818 bool clip(int x, int y);
819
820 void test_card();
821 void show_test_card() { this->show_test_card_ = true; }
822
823 protected:
832 virtual void draw_pixels_internal(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness,
833 bool big_endian, int x_offset, int y_offset, int x_pad);
834 bool clamp_x_(int x, int w, int &min_x, int &max_x);
835 bool clamp_y_(int y, int h, int &min_y, int &max_y);
836 void vprintf_(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format,
837 va_list arg);
838
839 void do_update_();
840 void clear_clipping_();
841
847 void ESPHOME_ALWAYS_INLINE feed_wdt_per_pixel_() {
848 if (++this->wdt_pixel_counter_ == 0)
849 this->feed_wdt_pixel_slow_();
850 }
851 void feed_wdt_pixel_slow_();
852
853 virtual int get_height_internal() = 0;
854 virtual int get_width_internal() = 0;
855
862 void filled_flat_side_triangle_(int x1, int y1, int x2, int y2, int x3, int y3, Color color);
863 void sort_triangle_points_by_y_(int *x1, int *y1, int *x2, int *y2, int *x3, int *y3);
864
867 DisplayPage *page_{nullptr};
868#ifdef DISPLAY_PAGE_CHANGE_CALLBACK_COUNT
869 StaticCallbackManager<DISPLAY_PAGE_CHANGE_CALLBACK_COUNT, void(DisplayPage *, DisplayPage *)> page_change_callback_;
870#endif
871 bool auto_clear_enabled_{true};
872 std::vector<Rect> clipping_rectangle_;
873 uint8_t wdt_pixel_counter_{0};
874 bool show_test_card_{false};
875};
876
877class DisplayPage final {
878 public:
880 void show();
881 void show_next();
882 void show_prev();
883 void set_parent(Display *parent) { this->parent_ = parent; }
884 void set_prev(DisplayPage *prev) { this->prev_ = prev; }
885 void set_next(DisplayPage *next) { this->next_ = next; }
886 const display_writer_t &get_writer() const;
887
888 protected:
891 DisplayPage *prev_{nullptr};
892 DisplayPage *next_{nullptr};
893};
894
895inline void Display::show_next_page() { this->page_->show_next(); }
896inline void Display::show_prev_page() { this->page_->show_prev(); }
897
898const LogString *text_align_to_string(TextAlign textalign);
899
900} // namespace esphome::display
uint8_t h
Definition bl0906.h:2
This class simplifies creating components that periodically check a state.
Definition component.h:541
CallbackManager backed by StaticVector for compile-time-known callback counts.
Definition helpers.h:2207
virtual void measure(const char *str, int *width, int *x_offset, int *baseline, int *height)=0
virtual void print(int x, int y, Display *display, Color color, const char *text, Color background)=0
virtual int get_height() const =0
virtual int get_width() const =0
virtual void draw(int x, int y, Display *display, Color color_on, Color color_off)=0
virtual bool pixel_axes_swapped() const
True when draw_pixel_at() swaps x and y before writing, so pixels that are neighbours along x land a ...
Definition display.h:759
StaticCallbackManager< DISPLAY_PAGE_CHANGE_CALLBACK_COUNT, void(DisplayPage *, DisplayPage *)> page_change_callback_
Definition display.h:869
void shrink_clipping(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom)
Definition display.h:793
void ESPHOME_ALWAYS_INLINE feed_wdt_per_pixel_()
Watchdog feed for per pixel loops.
Definition display.h:847
bool is_clipping() const
Definition display.h:807
const DisplayPage * get_active_page() const
Definition display.h:739
int get_native_width()
Get the native (original) width of the display in pixels.
Definition display.h:343
virtual int get_height()
Get the calculated height of the display in pixels with rotation applied.
Definition display.h:340
virtual DisplayRotation get_rotation() const
Definition display.h:753
void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness, bool big_endian)
Convenience overload for base case where the pixels are packed into the buffer with no gaps (e....
Definition display.h:378
virtual int get_width()
Get the calculated width of the display in pixels with rotation applied.
Definition display.h:338
virtual void draw_pixel_at(int x, int y, Color color)=0
Set a single pixel at the specified coordinates to the given color.
bool ESPHOME_ALWAYS_INLINE is_point_clipped(int x, int y) const
Whether (x, y) falls outside the active clipping rectangle.
Definition display.h:812
virtual DisplayType get_display_type()=0
Get the type of display that the buffer corresponds to.
void start_clipping(int16_t left, int16_t top, int16_t right, int16_t bottom)
Definition display.h:773
virtual int get_width_internal()=0
void set_writer(display_writer_t &&writer)
Internal method to set the display writer lambda.
Definition display.h:731
void draw_pixel_at(int x, int y)
Set a single pixel at the specified coordinates to default color.
Definition display.h:348
void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad)
Given an array of pixels encoded in the nominated format, draw these into the display's buffer.
Definition display.h:372
int get_native_height()
Get the native (original) height of the display in pixels.
Definition display.h:345
virtual int get_height_internal()=0
virtual void set_rotation(DisplayRotation rotation)
Internal method to set the display rotation with.
Definition display.h:748
void add_on_page_change_callback(F &&callback)
Definition display.h:742
void set_auto_clear(bool auto_clear_enabled)
Definition display.h:751
void extend_clipping(int16_t left, int16_t top, int16_t right, int16_t bottom)
Definition display.h:783
std::vector< Rect > clipping_rectangle_
Definition display.h:872
ESPDEPRECATED("Pixels are always RGB: call draw_pixels_at() without the ColorOrder, and override draw_pixels_internal() " "to copy blocks. Removed in 2027.5.0", "2026.11.0") virtual void draw_pixels_at(int x_start
The block form above with a color order.
display_writer_t writer_
Definition display.h:890
void set_next(DisplayPage *next)
Definition display.h:885
void set_parent(Display *parent)
Definition display.h:883
void set_prev(DisplayPage *prev)
Definition display.h:884
Optimized display writer that uses function pointers for stateless lambdas.
Definition display.h:196
DisplayWriter(DisplayWriter &&other) noexcept
Definition display.h:227
std::function< void(T &)> * f_
Definition display.h:293
DisplayWriter & operator=(DisplayWriter &&other) noexcept
Definition display.h:246
void operator()(T &display) const
Definition display.h:279
enum esphome::display::DisplayWriter::@73 type_
DisplayWriter & operator=(const DisplayWriter &other)
Definition display.h:238
DisplayWriter(const DisplayWriter &other)
Definition display.h:218
ESPHOME_ALWAYS_INLINE ~DisplayWriter()
Definition display.h:255
const DisplayWriter & operator*() const
Definition display.h:283
DisplayWriter & operator*()
Definition display.h:282
void call(T &display) const
Definition display.h:264
NameCopy * next
const char * format
@ DISPLAY_ROTATION_0_DEGREES
Definition display.h:137
@ DISPLAY_ROTATION_270_DEGREES
Definition display.h:140
@ DISPLAY_ROTATION_180_DEGREES
Definition display.h:139
@ DISPLAY_ROTATION_90_DEGREES
Definition display.h:138
constexpr Color COLOR_ON(255, 255, 255, 255)
Turn the pixel ON.
constexpr Color COLOR_OFF(0, 0, 0, 0)
Turn the pixel OFF.
static void int int int int const uint8_t ColorOrder ColorBitness bool big_endian
Definition display.cpp:100
const int EDGES_TRIGON
Definition display.h:148
static void int int int int const uint8_t ColorOrder ColorBitness bitness
Definition display.cpp:99
const int EDGES_PENTADECAGON
Definition display.h:163
const int EDGES_OCTAGON
Definition display.h:155
const int EDGES_HEXADECAGON
Definition display.h:164
const int EDGES_DODECAGON
Definition display.h:160
const int EDGES_PENTAGON
Definition display.h:152
const float ROTATION_45_DEGREES
Definition display.h:167
constexpr bool rotation_swaps_axes(DisplayRotation rotation)
Whether a rotation swaps the x and y axes.
Definition display.h:144
static void int x_start
Definition display.cpp:61
const int EDGES_TRIANGLE
Definition display.h:149
const LogString * text_align_to_string(TextAlign textalign)
Definition display.cpp:947
ImageAlign
ImageAlign is used to tell the display class how to position a image.
Definition display.h:105
static void int int int int const uint8_t int x_offset
Definition display.cpp:62
const int EDGES_QUADRILATERAL
Definition display.h:151
static void int int y_start
Definition display.cpp:61
static void int int int int const uint8_t ColorOrder order
Definition display.cpp:99
const int EDGES_DECAGON
Definition display.h:158
const int EDGES_TETRADECAGON
Definition display.h:162
const float ROTATION_270_DEGREES
Definition display.h:170
static void int int int int const uint8_t int int y_offset
Definition display.cpp:62
const float ROTATION_180_DEGREES
Definition display.h:169
static void int int int w
Definition display.cpp:61
const int EDGES_HEPTAGON
Definition display.h:154
const int EDGES_HENDECAGON
Definition display.h:159
const int EDGES_TRIDECAGON
Definition display.h:161
TextAlign
TextAlign is used to tell the display class how to position a piece of text.
Definition display.h:55
const int EDGES_NONAGON
Definition display.h:156
const float ROTATION_90_DEGREES
Definition display.h:168
const int EDGES_ENNEAGON
Definition display.h:157
static void int int int int const uint8_t * ptr
Definition display.cpp:62
static void int int int int const uint8_t int int int x_pad
Definition display.cpp:62
const int EDGES_TETRAGON
Definition display.h:150
const int EDGES_HEXAGON
Definition display.h:153
const float ROTATION_0_DEGREES
Definition display.h:166
void const char int line
Definition log.h:110
A more user-friendly version of struct tm from time.h.
Definition time.h:23
std::string print()
uint16_t length
Definition tt21100.cpp:0
uint16_t x
Definition tt21100.cpp:5
uint16_t y
Definition tt21100.cpp:6