21 const int32_t dx = abs(x2 - x1), sx = x1 < x2 ? 1 : -1;
22 const int32_t dy = -abs(y2 - y1), sy = y1 < y2 ? 1 : -1;
23 int32_t err = dx + dy;
27 if (x1 == x2 && y1 == y2)
47 int x1 = (start_radius * std::cos(angle * std::numbers::pi_v<float> / 180)) +
x;
48 int y1 = (start_radius * std::sin(angle * std::numbers::pi_v<float> / 180)) +
y;
49 int x2 = (stop_radius * std::cos(angle * std::numbers::pi_v<float> / 180)) +
x;
50 int y2 = (stop_radius * std::sin(angle * std::numbers::pi_v<float> / 180)) +
y;
53 this->
line(x1, y1, x2, y2, color);
61template<ColorBitness BITNESS,
bool HIGH_BYTE_FIRST = false>
79 for (
int x = 0;
x !=
w;
x++, column_idx++) {
80 size_t source_idx = column_idx;
81 for (
int y = 0;
y !=
h;
y++, source_idx += line_stride) {
89 for (
int y = 0;
y !=
h;
y++) {
91 for (
int x = 0;
x !=
w;
x++, source_idx++) {
103 for (
int y = 0;
y !=
h;
y++) {
105 for (
int x = 0;
x !=
w;
x++, source_idx++) {
123#pragma GCC diagnostic push
124#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
125 this->
draw_pixels_at(x_start,
y_start,
w,
h,
ptr,
COLOR_ORDER_RGB,
bitness,
big_endian,
x_offset,
y_offset,
x_pad);
126#pragma GCC diagnostic pop
134 draw_ordered_pixels(
this,
x_start,
y_start,
w,
h,
ptr,
order,
bitness,
big_endian,
x_offset,
y_offset,
x_pad);
156 for (
int i =
x; i <
x + width; i++)
162 for (
int i =
y; i <
y + height; i++)
175 for (
int i = y1; i < y1 + height; i++) {
183 int err = 2 - 2 * radius;
194 if (-dx == dy && e2 <= dx) {
205 int dx = -int32_t(radius);
207 int err = 2 - 2 * radius;
215 int hline_width = 2 * (-dx) + 1;
216 this->
horizontal_line(center_x + dx, center_y + dy, hline_width, color);
217 this->
horizontal_line(center_x + dx, center_y - dy, hline_width, color);
221 if (-dx == dy && e2 <= dx) {
232 int rmax = radius1 > radius2 ? radius1 : radius2;
233 int rmin = radius1 < radius2 ? radius1 : radius2;
234 int dxmax = -int32_t(rmax), dxmin = -int32_t(rmin);
235 int dymax = 0, dymin = 0;
236 int errmax = 2 - 2 * rmax, errmin = 2 - 2 * rmin;
240 this->
draw_pixel_at(center_x - dxmax, center_y + dymax, color);
241 this->
draw_pixel_at(center_x + dxmax, center_y + dymax, color);
242 this->
draw_pixel_at(center_x - dxmin, center_y + dymin, color);
243 this->
draw_pixel_at(center_x + dxmin, center_y + dymin, color);
244 this->
draw_pixel_at(center_x + dxmax, center_y - dymax, color);
245 this->
draw_pixel_at(center_x - dxmax, center_y - dymax, color);
246 this->
draw_pixel_at(center_x + dxmin, center_y - dymin, color);
247 this->
draw_pixel_at(center_x - dxmin, center_y - dymin, color);
250 int hline_width = -(dxmax - dxmin) + 1;
251 this->
horizontal_line(center_x + dxmax, center_y + dymax, hline_width, color);
252 this->
horizontal_line(center_x - dxmin, center_y + dymax, hline_width, color);
253 this->
horizontal_line(center_x + dxmax, center_y - dymax, hline_width, color);
254 this->
horizontal_line(center_x - dxmin, center_y - dymax, hline_width, color);
257 int hline_width = 2 * (-dxmax) + 1;
258 this->
horizontal_line(center_x + dxmax, center_y + dymax, hline_width, color);
259 this->
horizontal_line(center_x + dxmax, center_y - dymax, hline_width, color);
264 errmax += ++dymax * 2 + 1;
265 if (-dxmax == dymax && e2max <= dxmax) {
270 errmax += ++dxmax * 2 + 1;
273 while (dymin < dymax && dymin < rmin) {
276 errmin += ++dymin * 2 + 1;
277 if (-dxmin == dymin && e2min <= dxmin) {
282 errmin += ++dxmin * 2 + 1;
285 }
while (dxmax <= 0);
289 int rmax = radius1 > radius2 ? radius1 : radius2;
290 int rmin = radius1 < radius2 ? radius1 : radius2;
291 int dxmax = -int32_t(rmax), dxmin = -int32_t(rmin), upd_dxmax, upd_dxmin;
292 int dymax = 0, dymin = 0;
293 int errmax = 2 - 2 * rmax, errmin = 2 - 2 * rmin;
295 progress = std::max(0, std::min(progress, 100));
296 int draw_progress = progress > 50 ? (100 - progress) : progress;
297 float tan_a = (progress == 50) ? 65535 : tanf(
float(draw_progress) * std::numbers::pi_v<float> / 100);
301 this->
draw_pixel_at(center_x + dxmax, center_y - dymax, color);
302 this->
draw_pixel_at(center_x - dxmax, center_y - dymax, color);
305 int lhline_width = -(dxmax - dxmin) + 1;
306 if (progress >= 50) {
307 if (
float(dymax) <
float(-dxmax) * tan_a) {
308 upd_dxmax = std::ceil(
float(dymax) / tan_a);
312 this->
horizontal_line(center_x + dxmax, center_y - dymax, lhline_width, color);
314 this->
horizontal_line(center_x - dxmin, center_y, lhline_width, color);
315 if (upd_dxmax > -dxmin) {
317 int rhline_width = (upd_dxmax + dxmin) + 1;
319 rhline_width > lhline_width ? lhline_width : rhline_width, color);
322 if (
float(dymin) >
float(-dxmin) * tan_a) {
323 upd_dxmin = std::ceil(
float(dymin) / tan_a);
327 lhline_width = -(dxmax + upd_dxmin) + 1;
329 this->
horizontal_line(center_x - dxmin, center_y, lhline_width, color);
330 if (lhline_width > 0)
331 this->
horizontal_line(center_x + dxmax, center_y - dymax, lhline_width, color);
335 int hline_width = 2 * (-dxmax) + 1;
336 if (progress >= 50) {
337 if (dymax <
float(-dxmax) * tan_a) {
338 upd_dxmax = std::ceil(
float(dymax) / tan_a);
339 hline_width = -dxmax + upd_dxmax + 1;
342 if (dymax <
float(-dxmax) * tan_a) {
343 upd_dxmax = std::ceil(
float(dymax) / tan_a);
344 hline_width = -dxmax - upd_dxmax + 1;
350 this->
horizontal_line(center_x + dxmax, center_y - dymax, hline_width, color);
354 errmax += ++dymax * 2 + 1;
355 if (-dxmax == dymax && e2max <= dxmax) {
360 errmax += ++dxmax * 2 + 1;
362 while (dymin <= dymax && dymin <= rmin && dxmin <= 0) {
363 this->
draw_pixel_at(center_x + dxmin, center_y - dymin, color);
364 this->
draw_pixel_at(center_x - dxmin, center_y - dymin, color);
367 errmin += ++dymin * 2 + 1;
368 if (-dxmin == dymin && e2min <= dxmin) {
373 errmin += ++dxmin * 2 + 1;
376 }
while (dxmax <= 0);
380 this->
line(x1, y1, x2, y2, color);
381 this->
line(x1, y1, x3, y3, color);
382 this->
line(x2, y2, x3, y3, color);
387 int x_temp = *x1, y_temp = *y1;
388 *x1 = *x2, *y1 = *y2;
389 *x2 = x_temp, *y2 = y_temp;
392 int x_temp = *x1, y_temp = *y1;
393 *x1 = *x3, *y1 = *y3;
394 *x3 = x_temp, *y3 = y_temp;
397 int x_temp = *x2, y_temp = *y2;
398 *x2 = *x3, *y2 = *y3;
399 *x3 = x_temp, *y3 = y_temp;
407 int s1_current_x = x1;
408 int s1_current_y = y1;
409 bool s1_axis_swap =
false;
410 int s1_dx = abs(x2 - x1);
411 int s1_dy = abs(y2 - y1);
412 int s1_sign_x = ((x2 - x1) >= 0) ? 1 : -1;
413 int s1_sign_y = ((y2 - y1) >= 0) ? 1 : -1;
421 int s1_error = 2 * s1_dy - s1_dx;
424 int s2_current_x = x1;
425 int s2_current_y = y1;
426 bool s2_axis_swap =
false;
427 int s2_dx = abs(x3 - x1);
428 int s2_dy = abs(y3 - y1);
429 int s2_sign_x = ((x3 - x1) >= 0) ? 1 : -1;
430 int s2_sign_y = ((y3 - y1) >= 0) ? 1 : -1;
438 int s2_error = 2 * s2_dy - s2_dx;
441 for (
int i = 0; i <= s1_dx; i++) {
442 if (s1_current_x <= s2_current_x) {
443 this->
horizontal_line(s1_current_x, s1_current_y, s2_current_x - s1_current_x + 1, color);
445 this->
horizontal_line(s2_current_x, s2_current_y, s1_current_x - s2_current_x + 1, color);
450 while (s1_error >= 0) {
452 s1_current_x += s1_sign_x;
454 s1_current_y += s1_sign_y;
456 s1_error = s1_error - 2 * s1_dx;
459 s1_current_y += s1_sign_y;
461 s1_current_x += s1_sign_x;
463 s1_error = s1_error + 2 * s1_dy;
467 while (s2_current_y != s1_current_y) {
468 while (s2_error >= 0) {
470 s2_current_x += s2_sign_x;
472 s2_current_y += s2_sign_y;
474 s2_error = s2_error - 2 * s2_dx;
477 s2_current_y += s2_sign_y;
479 s2_current_x += s2_sign_x;
481 s2_error = s2_error + 2 * s2_dy;
493 }
else if (y1 == y2) {
498 int x_temp = (int) (x1 + ((
float) (y2 - y1) / (
float) (y3 - y1)) * (x3 - x1)), y_temp = y2;
506 float rotation_degrees) {
513 float rotation_radians = rotation_degrees * std::numbers::pi_v<float> / 180;
519 rotation_radians -= (variation ==
VARIATION_FLAT_TOP) ? std::numbers::pi_v<float> / edges : 0.0f;
521 float vertex_angle = ((float) vertex_id) / edges * 2 * std::numbers::pi_v<float> + rotation_radians;
522 *vertex_x = (int) std::round(std::cos(vertex_angle) * radius) + center_x;
523 *vertex_y = (int) std::round(std::sin(vertex_angle) * radius) + center_y;
530 int previous_vertex_x, previous_vertex_y;
531 for (
int current_vertex_id = 0; current_vertex_id <= edges; current_vertex_id++) {
532 int current_vertex_x, current_vertex_y;
534 variation, rotation_degrees);
535 if (current_vertex_id > 0) {
538 this->
filled_triangle(x,
y, previous_vertex_x, previous_vertex_y, current_vertex_x, current_vertex_y, color);
540 this->
line(previous_vertex_x, previous_vertex_y, current_vertex_x, current_vertex_y, color);
543 previous_vertex_x = current_vertex_x;
544 previous_vertex_y = current_vertex_y;
559 float rotation_degrees,
Color color) {
584 this->
print(x,
y, font, color, align,
buffer, background);
619 image->
draw(
x,
y,
this, color_on, color_off);
629 qr_code->
draw(
this,
x,
y, color_on, scale);
633#ifdef USE_GRAPHICAL_DISPLAY_MENU
635 Rect rect(
x,
y, width, height);
636 menu->draw(
this, &rect);
641 int *width,
int *height) {
645 auto x_align =
TextAlign(
int(align) & 0x18);
646 auto y_align =
TextAlign(
int(align) & 0x07);
670 *y1 =
y - (*height) / 2;
733 for (
auto *page : pages)
734 page->set_parent(
this);
736 for (
uint32_t i = 0; i < pages.size() - 1; i++) {
737 pages[i]->set_next(pages[i + 1]);
738 pages[i + 1]->set_prev(pages[i]);
740 pages[0]->set_prev(pages[pages.size() - 1]);
741 pages[pages.size() - 1]->set_next(pages[0]);
746#ifdef DISPLAY_PAGE_CHANGE_CALLBACK_COUNT
749 if (previous != page)
762 }
else if (this->
page_ !=
nullptr) {
775 this->
print(x,
y, font, color, align,
buffer, background);
804 ESP_LOGE(TAG,
"clear: Clipping is not set.");
812 ESP_LOGE(TAG,
"add: Clipping is not set.");
820 ESP_LOGE(TAG,
"add: Clipping is not set.");
847 min_x = std::max(
x, 0);
855 min_x = std::max(min_x, (
int) rect.x);
856 max_x = std::min(max_x, (
int) rect.x2());
859 return min_x < max_x;
863 min_y = std::max(
y, 0);
871 min_y = std::max(min_y, (
int) rect.y);
872 max_y = std::min(max_y, (
int) rect.y2());
875 return min_y < max_y;
878constexpr uint8_t TESTCARD_FONT[3][8]
PROGMEM = {{0x41, 0x7F, 0x7F, 0x09, 0x19, 0x7F, 0x66, 0x00},
879 {0x1C, 0x3E, 0x63, 0x41, 0x51, 0x73, 0x72, 0x00},
880 {0x41, 0x7F, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00}};
885 image_w = std::min(
w - 20, 310);
886 image_h = std::min(
h - 20, 255);
887 int shift_x = (
w - image_w) / 2;
888 int shift_y = (
h - image_h) / 2;
889 int line_w = (image_w - 6) / 6;
890 int image_c = image_w / 2;
892 Color r(255, 0, 0), g(0, 255, 0), b(0, 0, 255);
894 for (
auto i = 0; i != image_h; i++) {
895 int c = esp_scale(i, image_h);
896 this->
horizontal_line(shift_x + 0, shift_y + i, line_w, r.fade_to_white(c));
897 this->
horizontal_line(shift_x + line_w, shift_y + i, line_w, r.fade_to_black(c));
899 this->
horizontal_line(shift_x + image_c - line_w, shift_y + i, line_w, g.fade_to_white(c));
900 this->
horizontal_line(shift_x + image_c, shift_y + i, line_w, g.fade_to_black(c));
902 this->
horizontal_line(shift_x + image_w - (line_w * 2), shift_y + i, line_w, b.fade_to_white(c));
903 this->
horizontal_line(shift_x + image_w - line_w, shift_y + i, line_w, b.fade_to_black(c));
906 this->
rectangle(shift_x, shift_y, image_w, image_h,
Color(127, 127, 0));
908 uint16_t shift_r = shift_x + line_w - (8 * 3);
909 uint16_t shift_g = shift_x + image_c - (8 * 3);
910 uint16_t shift_b = shift_x + image_w - line_w - (8 * 3);
911 shift_y =
h / 2 - (8 * 3);
912 for (
auto i = 0; i < 8; i++) {
916 for (
auto k = 0; k < 8; k++) {
917 if ((ftr & (1 << k)) != 0) {
920 if ((ftg & (1 << k)) != 0) {
923 if ((ftb & (1 << k)) != 0) {
941 if (this->
next_ ==
nullptr) {
942 ESP_LOGE(TAG,
"no next page");
949 if (this->
prev_ ==
nullptr) {
950 ESP_LOGE(TAG,
"no previous page");
961 return LOG_STR(
"TOP_LEFT");
963 return LOG_STR(
"TOP_CENTER");
965 return LOG_STR(
"TOP_RIGHT");
967 return LOG_STR(
"CENTER_LEFT");
969 return LOG_STR(
"CENTER");
971 return LOG_STR(
"CENTER_RIGHT");
973 return LOG_STR(
"BASELINE_LEFT");
975 return LOG_STR(
"BASELINE_CENTER");
977 return LOG_STR(
"BASELINE_RIGHT");
979 return LOG_STR(
"BOTTOM_LEFT");
981 return LOG_STR(
"BOTTOM_CENTER");
983 return LOG_STR(
"BOTTOM_RIGHT");
985 return LOG_STR(
"UNKNOWN");
void feed_wdt()
Feed the task watchdog.
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
static Color to_color(uint32_t colorcode, ColorBitness color_bitness=ColorBitness::COLOR_BITNESS_888, bool right_bit_aligned=true)
Unpacks a color of the given bitness, red in the most significant bits.
static ESPHOME_ALWAYS_INLINE uint32_t read_packed(const uint8_t *ptr, size_t index, bool big_endian)
Reads one packed pixel of the given bitness from a source buffer into the value to_color() takes.
void show_page(DisplayPage *page)
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 ...
StaticCallbackManager< DISPLAY_PAGE_CHANGE_CALLBACK_COUNT, void(DisplayPage *, DisplayPage *)> page_change_callback_
bool clip(int x, int y)
Check if pixel is within region of display.
void get_regular_polygon_vertex(int vertex_id, int *vertex_x, int *vertex_y, int center_x, int center_y, int radius, int edges, RegularPolygonVariation variation=VARIATION_POINTY_TOP, float rotation_degrees=ROTATION_0_DEGREES)
Get the specified vertex (x,y) coordinates for the regular polygon inscribed in the circle centered o...
int int int const uint8_t ColorOrder ColorBitness bitness
virtual void clear()
Clear the entire screen by filling it with OFF pixels.
void end_clipping()
Reset the invalidation region.
void start_clipping(Rect rect)
Set the clipping rectangle for further drawing.
void set_pages(std::vector< DisplayPage * > pages)
void vprintf_(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format, va_list arg)
virtual int get_height()
Get the calculated height of the display in pixels with rotation applied.
int int int const uint8_t ColorOrder ColorBitness bool int int y_offset
virtual void fill(Color color)
Fill the entire screen with the given color.
int int int const uint8_t ColorOrder ColorBitness bool int int int x_pad
void horizontal_line(int x, int y, int width, Color color=COLOR_ON)
Draw a horizontal line from the point [x,y] to [x+width,y] with the given color.
void sort_triangle_points_by_y_(int *x1, int *y1, int *x2, int *y2, int *x3, int *y3)
int int int const uint8_t * ptr
int int int const uint8_t ColorOrder order
virtual int get_width()
Get the calculated width of the display in pixels with rotation applied.
void circle(int center_x, int center_xy, int radius, Color color=COLOR_ON)
Draw the outline of a circle centered around [center_x,center_y] with the radius radius with the give...
void filled_triangle(int x1, int y1, int x2, int y2, int x3, int y3, Color color=COLOR_ON)
Fill a triangle contained between the points [x1,y1], [x2,y2] and [x3,y3] with the given color.
void print(int x, int y, BaseFont *font, Color color, TextAlign align, const char *text, Color background=COLOR_OFF)
Print text with the anchor point at [x,y] with font.
void feed_wdt_pixel_slow_()
virtual void set_rotation(DisplayRotation rotation)
Internal method to set the display rotation with.
void filled_regular_polygon(int x, int y, int radius, int edges, RegularPolygonVariation variation=VARIATION_POINTY_TOP, float rotation_degrees=ROTATION_0_DEGREES, Color color=COLOR_ON)
Fill a regular polygon inscribed in the circle centered on [x,y] with the given radius and color.
void qr_code(int x, int y, qr_code::QrCode *qr_code, Color color_on=COLOR_ON, int scale=1)
Draw the qr_code with the top-left corner at [x,y] to the screen.
bool clamp_x_(int x, int w, int &min_x, int &max_x)
bool ESPHOME_ALWAYS_INLINE is_point_clipped(int x, int y) const
Whether (x, y) falls outside the active clipping rectangle.
void line(int x1, int y1, int x2, int y2, Color color=COLOR_ON)
Draw a straight line from the point [x1,y1] to [x2,y2] with the given color.
bool clamp_y_(int y, int h, int &min_y, int &max_y)
void filled_gauge(int center_x, int center_y, int radius1, int radius2, int progress, Color color=COLOR_ON)
Fill a half-ring "gauge" centered around [center_x,center_y] between two circles with the radius1 and...
virtual DisplayType get_display_type()=0
Get the type of display that the buffer corresponds to.
void void void void void void void void void void void image(int x, int y, BaseImage *image, Color color_on=COLOR_ON, Color color_off=COLOR_OFF)
Draw the image with the top-left corner at [x,y] to the screen.
void legend(int x, int y, graph::Graph *graph, Color color_on=COLOR_ON)
Draw the legend for graph with the top-left corner at [x,y] to the screen.
void rectangle(int x1, int y1, int width, int height, Color color=COLOR_ON)
Draw the outline of a rectangle with the top left point at [x1,y1] and the bottom right point at [x1+...
void filled_circle(int center_x, int center_y, int radius, Color color=COLOR_ON)
Fill a circle centered around [center_x,center_y] with the radius radius with the given color.
void void void void void void strftime(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format, ESPTime time) __attribute__((format(strftime
Evaluate the strftime-format format and print the result with the anchor point at [x,...
void triangle(int x1, int y1, int x2, int y2, int x3, int y3, Color color=COLOR_ON)
Draw the outline of a triangle contained between the points [x1,y1], [x2,y2] and [x3,...
void printf(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format,...) __attribute__((format(printf
Evaluate the printf-format format and print the result with the anchor point at [x,...
void set_writer(display_writer_t &&writer)
Internal method to set the display writer lambda.
void draw_pixel_at(int x, int y)
Set a single pixel at the specified coordinates to default color.
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.
void vertical_line(int x, int y, int height, Color color=COLOR_ON)
Draw a vertical line from the point [x,y] to [x,y+width] with the given color.
int int int const uint8_t ColorOrder ColorBitness bool big_endian
void graph(int x, int y, graph::Graph *graph, Color color_on=COLOR_ON)
Draw the graph with the top-left corner at [x,y] to the screen.
Rect get_clipping() const
Get the current the clipping rectangle.
void filled_ring(int center_x, int center_y, int radius1, int radius2, Color color=COLOR_ON)
Fill a ring centered around [center_x,center_y] between two circles with the radius1 and radius2 with...
void extend_clipping(Rect rect)
Add a rectangular region to the invalidation region.
int int int const uint8_t ColorOrder ColorBitness bool int x_offset
void menu(int x, int y, graphical_display_menu::GraphicalDisplayMenu *menu, int width, int height)
void line_at_angle(int x, int y, int angle, int length, Color color=COLOR_ON)
Draw a straight line at the given angle based on the origin [x, y] for a specified length with the gi...
void get_text_bounds(int x, int y, const char *text, BaseFont *font, TextAlign align, int *x1, int *y1, int *width, int *height)
Get the text bounds of the given string.
DisplayRotation rotation_
void regular_polygon(int x, int y, int radius, int edges, RegularPolygonVariation variation=VARIATION_POINTY_TOP, float rotation_degrees=ROTATION_0_DEGREES, Color color=COLOR_ON, RegularPolygonDrawing drawing=DRAWING_OUTLINE)
Draw the outline of a regular polygon inscribed in the circle centered on [x,y] with the given radius...
void filled_flat_side_triangle_(int x1, int y1, int x2, int y2, int x3, int y3, Color color)
This method fills a triangle using only integer variables by using a modified bresenham algorithm.
virtual void draw_pixels_internal(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)
Draws a block for draw_pixels_at(); the parameters are the same.
void shrink_clipping(Rect rect)
substract a rectangular region to the invalidation region
void filled_rectangle(int x1, int y1, int width, int height, Color color=COLOR_ON)
Fill a rectangle with the top left point at [x1,y1] and the bottom right point at [x1+width,...
std::vector< Rect > clipping_rectangle_
const display_writer_t & get_writer() const
DisplayPage(display_writer_t writer)
void draw(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color)
void draw_legend(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color)
void draw(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color, int scale)
struct @66::@67 __attribute__
Wake the main loop task from an ISR. ISR-safe.
constexpr uint8_t TESTCARD_FONT[3][8] PROGMEM
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
static void int int int int const uint8_t ColorOrder ColorBitness bitness
const LogString * text_align_to_string(TextAlign textalign)
ImageAlign
ImageAlign is used to tell the display class how to position a image.
static void int int int int const uint8_t int x_offset
const auto draw_source_pixel
static void int int y_start
static void int int int int const uint8_t ColorOrder order
const float ROTATION_270_DEGREES
static void int int int int const uint8_t int int y_offset
static void int int int w
ESPHOME_LOG_TAG(TAG, "display")
TextAlign
TextAlign is used to tell the display class how to position a piece of text.
Color apply_color_order(Color color, ColorOrder order)
static void int int int int h
static void int int int int const uint8_t * ptr
static void int int int int const uint8_t int int int x_pad
const float ROTATION_0_DEGREES
size_t size_t const char va_start(args, fmt)
Application App
Global storage of Application pointer - only one Application can exist.
uint8_t progmem_read_byte(const uint8_t *addr)
A more user-friendly version of struct tm from time.h.
size_t strftime(char *buffer, size_t buffer_len, const char *format)
Convert this ESPTime struct to a null-terminated c string buffer as specified by the format argument.