ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
display.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdarg>
4#include <vector>
5
6#include "rect.h"
7
12#include "esphome/core/time.h"
13#include "esphome/core/log.h"
14#include "display_color_utils.h"
15
16#ifdef USE_GRAPH
18#endif
19
20#ifdef USE_QR_CODE
22#endif
23
24#ifdef USE_GRAPHICAL_DISPLAY_MENU
26#endif
27
28namespace esphome::display {
29
80
128
134
141
143constexpr bool rotation_swaps_axes(DisplayRotation rotation) {
144 return rotation == DISPLAY_ROTATION_90_DEGREES || rotation == DISPLAY_ROTATION_270_DEGREES;
145}
146
147const int EDGES_TRIGON = 3;
148const int EDGES_TRIANGLE = 3;
149const int EDGES_TETRAGON = 4;
151const int EDGES_PENTAGON = 5;
152const int EDGES_HEXAGON = 6;
153const int EDGES_HEPTAGON = 7;
154const int EDGES_OCTAGON = 8;
155const int EDGES_NONAGON = 9;
156const int EDGES_ENNEAGON = 9;
157const int EDGES_DECAGON = 10;
158const int EDGES_HENDECAGON = 11;
159const int EDGES_DODECAGON = 12;
160const int EDGES_TRIDECAGON = 13;
161const int EDGES_TETRADECAGON = 14;
162const int EDGES_PENTADECAGON = 15;
163const int EDGES_HEXADECAGON = 16;
164
165const float ROTATION_0_DEGREES = 0.0;
166const float ROTATION_45_DEGREES = 45.0;
167const float ROTATION_90_DEGREES = 90.0;
168const float ROTATION_180_DEGREES = 180.0;
169const float ROTATION_270_DEGREES = 270.0;
170
175
180
181class Display;
182class DisplayPage;
183
195template<typename T> class DisplayWriter {
196 public:
198
199 // For stateless lambdas (convertible to function pointer): use function pointer (4 bytes)
200 template<typename F>
202 requires std::invocable<F, T &> && std::convertible_to<F, void (*)(T &)>
204 this->stateless_f_ = f; // Implicit conversion to function pointer
205 }
206
207 // For stateful lambdas and std::function (not convertible to function pointer): use std::function* (heap allocated)
208 // This handles backwards compatibility with external components
209 template<typename F>
211 requires std::invocable<F, T &> && (!std::convertible_to<F, void (*)(T &)>)
212 : type_(LAMBDA) {
213 this->f_ = new std::function<void(T &)>(std::move(f));
214 }
215
216 // Copy constructor
217 DisplayWriter(const DisplayWriter &other) : type_(other.type_) {
218 if (type_ == LAMBDA) {
219 this->f_ = new std::function<void(T &)>(*other.f_);
220 } else if (type_ == STATELESS_LAMBDA) {
221 this->stateless_f_ = other.stateless_f_;
222 }
223 }
224
225 // Move constructor
226 DisplayWriter(DisplayWriter &&other) noexcept : type_(other.type_) {
227 if (type_ == LAMBDA) {
228 this->f_ = other.f_;
229 other.f_ = nullptr;
230 } else if (type_ == STATELESS_LAMBDA) {
231 this->stateless_f_ = other.stateless_f_;
232 }
233 other.type_ = NONE;
234 }
235
236 // Assignment operators
238 if (this != &other) {
239 this->~DisplayWriter();
240 new (this) DisplayWriter(other);
241 }
242 return *this;
243 }
244
246 if (this != &other) {
247 this->~DisplayWriter();
248 new (this) DisplayWriter(std::move(other));
249 }
250 return *this;
251 }
252
254 if (type_ == LAMBDA) {
255 delete this->f_;
256 }
257 // STATELESS_LAMBDA/NONE: no cleanup needed (function pointer or empty)
258 }
259
260 bool has_value() const { return this->type_ != NONE; }
261
262 void call(T &display) const {
263 switch (this->type_) {
264 case STATELESS_LAMBDA:
265 this->stateless_f_(display); // Direct function pointer call
266 break;
267 case LAMBDA:
268 (*this->f_)(display); // std::function call
269 break;
270 case NONE:
271 default:
272 break;
273 }
274 }
275
276 // Operator() for convenience
277 void operator()(T &display) const { this->call(display); }
278
279 // Operator* for backwards compatibility with (*writer_)(*this) pattern
280 DisplayWriter &operator*() { return *this; }
281 const DisplayWriter &operator*() const { return *this; }
282
283 protected:
284 enum : uint8_t {
288 } type_;
289
290 union {
291 std::function<void(T &)> *f_;
292 void (*stateless_f_)(T &);
293 };
294};
295
296// Type alias for Display writer - uses optimized DisplayWriter instead of std::function
298
299// Callers usually pass `this`; checking a copy keeps GCC's -Wnonnull-compare quiet.
300#define LOG_DISPLAY(prefix, type, obj) \
301 if (auto *log_display_obj = (obj); log_display_obj != nullptr) { \
302 ESP_LOGCONFIG(TAG, \
303 prefix type "\n" \
304 "%s Rotations: %d °\n" \
305 "%s Dimensions: %dpx x %dpx", \
306 prefix, log_display_obj->get_rotation(), prefix, log_display_obj->get_width(), \
307 log_display_obj->get_height()); \
308 }
309
311inline constexpr Color COLOR_OFF(0, 0, 0, 0);
313inline constexpr Color COLOR_ON(255, 255, 255, 255);
314
316 public:
317 virtual void draw(int x, int y, Display *display, Color color_on, Color color_off) = 0;
318 virtual int get_width() const = 0;
319 virtual int get_height() const = 0;
320};
321
322class BaseFont {
323 public:
324 virtual void print(int x, int y, Display *display, Color color, const char *text, Color background) = 0;
325 virtual void measure(const char *str, int *width, int *x_offset, int *baseline, int *height) = 0;
326};
327
328class Display : public PollingComponent {
329 public:
331 virtual void fill(Color color);
333 virtual void clear();
334
336 virtual int get_width() { return this->get_width_internal(); }
338 virtual int get_height() { return this->get_height_internal(); }
339
341 int get_native_width() { return this->get_width_internal(); }
343 int get_native_height() { return this->get_height_internal(); }
344
346 inline void draw_pixel_at(int x, int y) { this->draw_pixel_at(x, y, COLOR_ON); }
347
349 virtual void draw_pixel_at(int x, int y, Color color) = 0;
350
370 void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness, bool big_endian,
371 int x_offset, int y_offset, int x_pad) {
372 this->draw_pixels_internal(x_start, y_start, w, h, ptr, bitness, big_endian, x_offset, y_offset, x_pad);
373 }
374
376 void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness,
377 bool big_endian) {
378 this->draw_pixels_internal(x_start, y_start, w, h, ptr, bitness, big_endian, 0, 0, 0);
379 }
380
381 // Remove before 2027.5.0
388 "Pixels are always RGB: call draw_pixels_at() without the ColorOrder, and override draw_pixels_internal() "
389 "to copy blocks. Removed in 2027.5.0",
390 "2026.11.0")
391 virtual void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorOrder order,
392 ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad);
393
394 // Remove before 2027.5.0
395 ESPDEPRECATED("Pixels are always RGB, drop the ColorOrder argument. Removed in 2027.5.0", "2026.11.0")
396 void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorOrder order,
397 ColorBitness bitness, bool big_endian) {
398#pragma GCC diagnostic push
399#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
400 this->draw_pixels_at(x_start, y_start, w, h, ptr, order, bitness, big_endian, 0, 0, 0);
401#pragma GCC diagnostic pop
402 }
403
405 void line(int x1, int y1, int x2, int y2, Color color = COLOR_ON);
406
408 void line_at_angle(int x, int y, int angle, int length, Color color = COLOR_ON);
409
412 void line_at_angle(int x, int y, int angle, int start_radius, int stop_radius, Color color = COLOR_ON);
413
415 void horizontal_line(int x, int y, int width, Color color = COLOR_ON);
416
418 void vertical_line(int x, int y, int height, Color color = COLOR_ON);
419
422 void rectangle(int x1, int y1, int width, int height, Color color = COLOR_ON);
423
425 void filled_rectangle(int x1, int y1, int width, int height, Color color = COLOR_ON);
426
428 void circle(int center_x, int center_xy, int radius, Color color = COLOR_ON);
429
431 void filled_circle(int center_x, int center_y, int radius, Color color = COLOR_ON);
432
435 void filled_ring(int center_x, int center_y, int radius1, int radius2, Color color = COLOR_ON);
438 void filled_gauge(int center_x, int center_y, int radius1, int radius2, int progress, Color color = COLOR_ON);
439
441 void triangle(int x1, int y1, int x2, int y2, int x3, int y3, Color color = COLOR_ON);
442
444 void filled_triangle(int x1, int y1, int x2, int y2, int x3, int y3, Color color = COLOR_ON);
445
454 void get_regular_polygon_vertex(int vertex_id, int *vertex_x, int *vertex_y, int center_x, int center_y, int radius,
455 int edges, RegularPolygonVariation variation = VARIATION_POINTY_TOP,
456 float rotation_degrees = ROTATION_0_DEGREES);
457
464 void regular_polygon(int x, int y, int radius, int edges, RegularPolygonVariation variation = VARIATION_POINTY_TOP,
465 float rotation_degrees = ROTATION_0_DEGREES, Color color = COLOR_ON,
466 RegularPolygonDrawing drawing = DRAWING_OUTLINE);
467 void regular_polygon(int x, int y, int radius, int edges, RegularPolygonVariation variation, Color color,
468 RegularPolygonDrawing drawing = DRAWING_OUTLINE);
469 void regular_polygon(int x, int y, int radius, int edges, Color color,
470 RegularPolygonDrawing drawing = DRAWING_OUTLINE);
471
476 void filled_regular_polygon(int x, int y, int radius, int edges,
477 RegularPolygonVariation variation = VARIATION_POINTY_TOP,
478 float rotation_degrees = ROTATION_0_DEGREES, Color color = COLOR_ON);
479 void filled_regular_polygon(int x, int y, int radius, int edges, RegularPolygonVariation variation, Color color);
480 void filled_regular_polygon(int x, int y, int radius, int edges, Color color);
481
492 void print(int x, int y, BaseFont *font, Color color, TextAlign align, const char *text,
493 Color background = COLOR_OFF);
494
504 void print(int x, int y, BaseFont *font, Color color, const char *text, Color background = COLOR_OFF);
505
514 void print(int x, int y, BaseFont *font, TextAlign align, const char *text);
515
523 void print(int x, int y, BaseFont *font, const char *text);
524
536 void printf(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format, ...)
537 __attribute__((format(printf, 8, 9)));
538
549 void printf(int x, int y, BaseFont *font, Color color, TextAlign align, const char *format, ...)
550 __attribute__((format(printf, 7, 8)));
551
561 void printf(int x, int y, BaseFont *font, Color color, const char *format, ...) __attribute__((format(printf, 6, 7)));
562
572 void printf(int x, int y, BaseFont *font, TextAlign align, const char *format, ...)
573 __attribute__((format(printf, 6, 7)));
574
583 void printf(int x, int y, BaseFont *font, const char *format, ...) __attribute__((format(printf, 5, 6)));
584
596 void strftime(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format,
597 ESPTime time) __attribute__((format(strftime, 8, 0)));
598
609 void strftime(int x, int y, BaseFont *font, Color color, TextAlign align, const char *format, ESPTime time)
610 __attribute__((format(strftime, 7, 0)));
611
621 void strftime(int x, int y, BaseFont *font, Color color, const char *format, ESPTime time)
622 __attribute__((format(strftime, 6, 0)));
623
633 void strftime(int x, int y, BaseFont *font, TextAlign align, const char *format, ESPTime time)
634 __attribute__((format(strftime, 6, 0)));
635
644 void strftime(int x, int y, BaseFont *font, const char *format, ESPTime time) __attribute__((format(strftime, 5, 0)));
645
654 void image(int x, int y, BaseImage *image, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
655
665 void image(int x, int y, BaseImage *image, ImageAlign align, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
666
667#ifdef USE_GRAPH
675 void graph(int x, int y, graph::Graph *graph, Color color_on = COLOR_ON);
676
688 void legend(int x, int y, graph::Graph *graph, Color color_on = COLOR_ON);
689#endif // USE_GRAPH
690
691#ifdef USE_QR_CODE
699 void qr_code(int x, int y, qr_code::QrCode *qr_code, Color color_on = COLOR_ON, int scale = 1);
700#endif
701
702#ifdef USE_GRAPHICAL_DISPLAY_MENU
710 void menu(int x, int y, graphical_display_menu::GraphicalDisplayMenu *menu, int width, int height);
711#endif // USE_GRAPHICAL_DISPLAY_MENU
712
725 void get_text_bounds(int x, int y, const char *text, BaseFont *font, TextAlign align, int *x1, int *y1, int *width,
726 int *height);
727
729 void set_writer(display_writer_t &&writer);
730
731 void show_page(DisplayPage *page);
732 void show_next_page();
733 void show_prev_page();
734
735 void set_pages(std::vector<DisplayPage *> pages);
736
737 const DisplayPage *get_active_page() const { return this->page_; }
738
739#ifdef DISPLAY_PAGE_CHANGE_CALLBACK_COUNT
740 template<typename F> void add_on_page_change_callback(F &&callback) {
741 this->page_change_callback_.add(std::forward<F>(callback));
742 }
743#endif
744
746 virtual void set_rotation(DisplayRotation rotation);
747
748 // Internal method to set display auto clearing.
749 void set_auto_clear(bool auto_clear_enabled) { this->auto_clear_enabled_ = auto_clear_enabled; }
750
751 virtual DisplayRotation get_rotation() const { return this->rotation_; }
752
757 virtual bool pixel_axes_swapped() const { return rotation_swaps_axes(this->rotation_); }
758
763
770 void start_clipping(Rect rect);
771 void start_clipping(int16_t left, int16_t top, int16_t right, int16_t bottom) {
772 start_clipping(Rect(left, top, right - left, bottom - top));
773 };
774
780 void extend_clipping(Rect rect);
781 void extend_clipping(int16_t left, int16_t top, int16_t right, int16_t bottom) {
782 this->extend_clipping(Rect(left, top, right - left, bottom - top));
783 };
784
790 void shrink_clipping(Rect rect);
791 void shrink_clipping(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) {
792 this->shrink_clipping(Rect(left, top, right - left, bottom - top));
793 };
794
797 void end_clipping();
798
803 Rect get_clipping() const;
804
805 bool is_clipping() const { return !this->clipping_rectangle_.empty(); }
806
810 bool ESPHOME_ALWAYS_INLINE is_point_clipped(int x, int y) const {
811 return this->is_clipping() && !this->clipping_rectangle_.back().inside(x, y);
812 }
813
816 bool clip(int x, int y);
817
818 void test_card();
819 void show_test_card() { this->show_test_card_ = true; }
820
821 protected:
830 virtual void draw_pixels_internal(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness,
831 bool big_endian, int x_offset, int y_offset, int x_pad);
832 bool clamp_x_(int x, int w, int &min_x, int &max_x);
833 bool clamp_y_(int y, int h, int &min_y, int &max_y);
834 void vprintf_(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format,
835 va_list arg);
836
837 void do_update_();
838 void clear_clipping_();
839
845 void ESPHOME_ALWAYS_INLINE feed_wdt_per_pixel_() {
846 if (++this->wdt_pixel_counter_ == 0)
847 this->feed_wdt_pixel_slow_();
848 }
849 void feed_wdt_pixel_slow_();
850
851 virtual int get_height_internal() = 0;
852 virtual int get_width_internal() = 0;
853
860 void filled_flat_side_triangle_(int x1, int y1, int x2, int y2, int x3, int y3, Color color);
861 void sort_triangle_points_by_y_(int *x1, int *y1, int *x2, int *y2, int *x3, int *y3);
862
865 DisplayPage *page_{nullptr};
866#ifdef DISPLAY_PAGE_CHANGE_CALLBACK_COUNT
867 StaticCallbackManager<DISPLAY_PAGE_CHANGE_CALLBACK_COUNT, void(DisplayPage *, DisplayPage *)> page_change_callback_;
868#endif
869 bool auto_clear_enabled_{true};
870 std::vector<Rect> clipping_rectangle_;
871 uint8_t wdt_pixel_counter_{0};
872 bool show_test_card_{false};
873};
874
875class DisplayPage final {
876 public:
878 void show();
879 void show_next();
880 void show_prev();
881 void set_parent(Display *parent) { this->parent_ = parent; }
882 void set_prev(DisplayPage *prev) { this->prev_ = prev; }
883 void set_next(DisplayPage *next) { this->next_ = next; }
884 const display_writer_t &get_writer() const;
885
886 protected:
889 DisplayPage *prev_{nullptr};
890 DisplayPage *next_{nullptr};
891};
892
893inline void Display::show_next_page() { this->page_->show_next(); }
894inline void Display::show_prev_page() { this->page_->show_prev(); }
895
896template<typename... Ts> class DisplayPageShowAction final : public Action<Ts...> {
897 public:
899
900 void play(const Ts &...x) override {
901 auto *page = this->page_.value(x...);
902 if (page != nullptr) {
903 page->show();
904 }
905 }
906};
907
908const LogString *text_align_to_string(TextAlign textalign);
909
910} // namespace esphome::display
uint8_t h
Definition bl0906.h:2
This class simplifies creating components that periodically check a state.
Definition component.h:519
CallbackManager backed by StaticVector for compile-time-known callback counts.
Definition helpers.h:1960
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:757
StaticCallbackManager< DISPLAY_PAGE_CHANGE_CALLBACK_COUNT, void(DisplayPage *, DisplayPage *)> page_change_callback_
Definition display.h:867
void shrink_clipping(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom)
Definition display.h:791
void ESPHOME_ALWAYS_INLINE feed_wdt_per_pixel_()
Watchdog feed for per pixel loops.
Definition display.h:845
bool is_clipping() const
Definition display.h:805
const DisplayPage * get_active_page() const
Definition display.h:737
int get_native_width()
Get the native (original) width of the display in pixels.
Definition display.h:341
virtual int get_height()
Get the calculated height of the display in pixels with rotation applied.
Definition display.h:338
virtual DisplayRotation get_rotation() const
Definition display.h:751
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:376
virtual int get_width()
Get the calculated width of the display in pixels with rotation applied.
Definition display.h:336
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:810
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:771
virtual int get_width_internal()=0
void draw_pixel_at(int x, int y)
Set a single pixel at the specified coordinates to default color.
Definition display.h:346
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:370
int get_native_height()
Get the native (original) height of the display in pixels.
Definition display.h:343
virtual int get_height_internal()=0
void add_on_page_change_callback(F &&callback)
Definition display.h:740
void set_auto_clear(bool auto_clear_enabled)
Definition display.h:749
void extend_clipping(int16_t left, int16_t top, int16_t right, int16_t bottom)
Definition display.h:781
std::vector< Rect > clipping_rectangle_
Definition display.h:870
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:888
void set_next(DisplayPage *next)
Definition display.h:883
void set_parent(Display *parent)
Definition display.h:881
void set_prev(DisplayPage *prev)
Definition display.h:882
TEMPLATABLE_VALUE(DisplayPage *, page) void play(const Ts &...x) override
Definition display.h:898
Optimized display writer that uses function pointers for stateless lambdas.
Definition display.h:195
DisplayWriter(DisplayWriter &&other) noexcept
Definition display.h:226
std::function< void(T &)> * f_
Definition display.h:291
DisplayWriter & operator=(DisplayWriter &&other) noexcept
Definition display.h:245
void operator()(T &display) const
Definition display.h:277
enum esphome::display::DisplayWriter::@74 type_
DisplayWriter & operator=(const DisplayWriter &other)
Definition display.h:237
DisplayWriter(const DisplayWriter &other)
Definition display.h:217
const DisplayWriter & operator*() const
Definition display.h:281
DisplayWriter & operator*()
Definition display.h:280
void call(T &display) const
Definition display.h:262
NameCopy * next
const char * format
@ DISPLAY_ROTATION_0_DEGREES
Definition display.h:136
@ DISPLAY_ROTATION_270_DEGREES
Definition display.h:139
@ DISPLAY_ROTATION_180_DEGREES
Definition display.h:138
@ DISPLAY_ROTATION_90_DEGREES
Definition display.h:137
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:101
const int EDGES_TRIGON
Definition display.h:147
static void int int int int const uint8_t ColorOrder ColorBitness bitness
Definition display.cpp:100
const int EDGES_PENTADECAGON
Definition display.h:162
const int EDGES_OCTAGON
Definition display.h:154
const int EDGES_HEXADECAGON
Definition display.h:163
const int EDGES_DODECAGON
Definition display.h:159
const int EDGES_PENTAGON
Definition display.h:151
const float ROTATION_45_DEGREES
Definition display.h:166
constexpr bool rotation_swaps_axes(DisplayRotation rotation)
Whether a rotation swaps the x and y axes.
Definition display.h:143
static void int x_start
Definition display.cpp:62
const int EDGES_TRIANGLE
Definition display.h:148
ImageAlign
ImageAlign is used to tell the display class how to position a image.
Definition display.h:104
static void int int int int const uint8_t int x_offset
Definition display.cpp:63
const int EDGES_QUADRILATERAL
Definition display.h:150
static void int int y_start
Definition display.cpp:62
static void int int int int const uint8_t ColorOrder order
Definition display.cpp:100
const int EDGES_DECAGON
Definition display.h:157
const int EDGES_TETRADECAGON
Definition display.h:161
const float ROTATION_270_DEGREES
Definition display.h:169
static void int int int int const uint8_t int int y_offset
Definition display.cpp:63
const float ROTATION_180_DEGREES
Definition display.h:168
static void int int int w
Definition display.cpp:62
const int EDGES_HEPTAGON
Definition display.h:153
const int EDGES_HENDECAGON
Definition display.h:158
const int EDGES_TRIDECAGON
Definition display.h:160
TextAlign
TextAlign is used to tell the display class how to position a piece of text.
Definition display.h:54
const int EDGES_NONAGON
Definition display.h:155
const float ROTATION_90_DEGREES
Definition display.h:167
const int EDGES_ENNEAGON
Definition display.h:156
static void int int int int const uint8_t * ptr
Definition display.cpp:63
static void int int int int const uint8_t int int int x_pad
Definition display.cpp:63
const int EDGES_TETRAGON
Definition display.h:149
const int EDGES_HEXAGON
Definition display.h:152
const float ROTATION_0_DEGREES
Definition display.h:165
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