10 static const char *
const TAG =
"display";
19 const int32_t dx = abs(x2 - x1), sx = x1 < x2 ? 1 : -1;
20 const int32_t dy = -abs(y2 - y1), sy = y1 < y2 ? 1 : -1;
21 int32_t err = dx + dy;
25 if (x1 == x2 && y1 == y2)
45 int x1 = (start_radius * cos(angle * M_PI / 180)) + x;
46 int y1 = (start_radius * sin(angle * M_PI / 180)) + y;
47 int x2 = (stop_radius * cos(angle * M_PI / 180)) + x;
48 int y2 = (stop_radius * sin(angle * M_PI / 180)) + y;
51 this->
line(x1, y1, x2, y2, color);
55 ColorBitness bitness,
bool big_endian,
int x_offset,
int y_offset,
int x_pad) {
56 size_t line_stride = x_offset + w + x_pad;
58 for (
int y = 0;
y !=
h;
y++) {
59 size_t source_idx = (y_offset +
y) * line_stride + x_offset;
60 size_t source_idx_mod;
61 for (
int x = 0;
x != w;
x++, source_idx++) {
64 color_value = ptr[source_idx];
67 source_idx_mod = source_idx * 2;
69 color_value = (ptr[source_idx_mod] << 8) + ptr[source_idx_mod + 1];
71 color_value = ptr[source_idx_mod] + (ptr[source_idx_mod + 1] << 8);
75 source_idx_mod = source_idx * 3;
77 color_value = (ptr[source_idx_mod + 0] << 16) + (ptr[source_idx_mod + 1] << 8) + ptr[source_idx_mod + 2];
79 color_value = ptr[source_idx_mod + 0] + (ptr[source_idx_mod + 1] << 8) + (ptr[source_idx_mod + 2] << 16);
90 for (
int i = x; i < x + width; i++)
95 for (
int i = y; i < y + height; i++)
106 for (
int i = y1; i < y1 + height; i++) {
113 int err = 2 - 2 * radius;
124 if (-dx == dy && e2 <= dx) {
134 int dx = -int32_t(radius);
136 int err = 2 - 2 * radius;
144 int hline_width = 2 * (-dx) + 1;
145 this->
horizontal_line(center_x + dx, center_y + dy, hline_width, color);
146 this->
horizontal_line(center_x + dx, center_y - dy, hline_width, color);
150 if (-dx == dy && e2 <= dx) {
160 int rmax = radius1 > radius2 ? radius1 : radius2;
161 int rmin = radius1 < radius2 ? radius1 : radius2;
162 int dxmax = -int32_t(rmax), dxmin = -int32_t(rmin);
163 int dymax = 0, dymin = 0;
164 int errmax = 2 - 2 * rmax, errmin = 2 - 2 * rmin;
168 this->
draw_pixel_at(center_x - dxmax, center_y + dymax, color);
169 this->
draw_pixel_at(center_x + dxmax, center_y + dymax, color);
170 this->
draw_pixel_at(center_x - dxmin, center_y + dymin, color);
171 this->
draw_pixel_at(center_x + dxmin, center_y + dymin, color);
172 this->
draw_pixel_at(center_x + dxmax, center_y - dymax, color);
173 this->
draw_pixel_at(center_x - dxmax, center_y - dymax, color);
174 this->
draw_pixel_at(center_x + dxmin, center_y - dymin, color);
175 this->
draw_pixel_at(center_x - dxmin, center_y - dymin, color);
178 int hline_width = -(dxmax - dxmin) + 1;
179 this->
horizontal_line(center_x + dxmax, center_y + dymax, hline_width, color);
180 this->
horizontal_line(center_x - dxmin, center_y + dymax, hline_width, color);
181 this->
horizontal_line(center_x + dxmax, center_y - dymax, hline_width, color);
182 this->
horizontal_line(center_x - dxmin, center_y - dymax, hline_width, color);
185 int hline_width = 2 * (-dxmax) + 1;
186 this->
horizontal_line(center_x + dxmax, center_y + dymax, hline_width, color);
187 this->
horizontal_line(center_x + dxmax, center_y - dymax, hline_width, color);
192 errmax += ++dymax * 2 + 1;
193 if (-dxmax == dymax && e2max <= dxmax) {
198 errmax += ++dxmax * 2 + 1;
201 while (dymin < dymax && dymin < rmin) {
204 errmin += ++dymin * 2 + 1;
205 if (-dxmin == dymin && e2min <= dxmin) {
210 errmin += ++dxmin * 2 + 1;
213 }
while (dxmax <= 0);
216 int rmax = radius1 > radius2 ? radius1 : radius2;
217 int rmin = radius1 < radius2 ? radius1 : radius2;
218 int dxmax = -int32_t(rmax), dxmin = -int32_t(rmin), upd_dxmax, upd_dxmin;
219 int dymax = 0, dymin = 0;
220 int errmax = 2 - 2 * rmax, errmin = 2 - 2 * rmin;
222 progress = std::max(0, std::min(progress, 100));
223 int draw_progress = progress > 50 ? (100 - progress) : progress;
224 float tan_a = (progress == 50) ? 65535 : tan(
float(draw_progress) * M_PI / 100);
228 this->
draw_pixel_at(center_x + dxmax, center_y - dymax, color);
229 this->
draw_pixel_at(center_x - dxmax, center_y - dymax, color);
231 int lhline_width = -(dxmax - dxmin) + 1;
232 if (progress >= 50) {
233 if (
float(dymax) < float(-dxmax) * tan_a) {
234 upd_dxmax = ceil(
float(dymax) / tan_a);
238 this->
horizontal_line(center_x + dxmax, center_y - dymax, lhline_width, color);
240 this->
horizontal_line(center_x - dxmin, center_y, lhline_width, color);
241 if (upd_dxmax > -dxmin) {
242 int rhline_width = (upd_dxmax + dxmin) + 1;
244 rhline_width > lhline_width ? lhline_width : rhline_width, color);
247 if (
float(dymin) >
float(-dxmin) * tan_a) {
248 upd_dxmin = ceil(
float(dymin) / tan_a);
252 lhline_width = -(dxmax + upd_dxmin) + 1;
254 this->
horizontal_line(center_x - dxmin, center_y, lhline_width, color);
255 if (lhline_width > 0)
256 this->
horizontal_line(center_x + dxmax, center_y - dymax, lhline_width, color);
259 int hline_width = 2 * (-dxmax) + 1;
260 if (progress >= 50) {
261 if (dymax <
float(-dxmax) * tan_a) {
262 upd_dxmax = ceil(
float(dymax) / tan_a);
263 hline_width = -dxmax + upd_dxmax + 1;
266 if (dymax <
float(-dxmax) * tan_a) {
267 upd_dxmax = ceil(
float(dymax) / tan_a);
268 hline_width = -dxmax - upd_dxmax + 1;
273 this->
horizontal_line(center_x + dxmax, center_y - dymax, hline_width, color);
277 errmax += ++dymax * 2 + 1;
278 if (-dxmax == dymax && e2max <= dxmax) {
283 errmax += ++dxmax * 2 + 1;
285 while (dymin <= dymax && dymin <= rmin && dxmin <= 0) {
286 this->
draw_pixel_at(center_x + dxmin, center_y - dymin, color);
287 this->
draw_pixel_at(center_x - dxmin, center_y - dymin, color);
290 errmin += ++dymin * 2 + 1;
291 if (-dxmin == dymin && e2min <= dxmin) {
296 errmin += ++dxmin * 2 + 1;
299 }
while (dxmax <= 0);
302 this->
line(x1, y1, x2, y2, color);
303 this->
line(x1, y1, x3, y3, color);
304 this->
line(x2, y2, x3, y3, color);
308 int x_temp = *x1, y_temp = *y1;
309 *x1 = *x2, *y1 = *y2;
310 *x2 = x_temp, *y2 = y_temp;
313 int x_temp = *x1, y_temp = *y1;
314 *x1 = *x3, *y1 = *y3;
315 *x3 = x_temp, *y3 = y_temp;
318 int x_temp = *x2, y_temp = *y2;
319 *x2 = *x3, *y2 = *y3;
320 *x3 = x_temp, *y3 = y_temp;
327 int s1_current_x = x1;
328 int s1_current_y = y1;
329 bool s1_axis_swap =
false;
330 int s1_dx = abs(x2 - x1);
331 int s1_dy = abs(y2 - y1);
332 int s1_sign_x = ((x2 - x1) >= 0) ? 1 : -1;
333 int s1_sign_y = ((y2 - y1) >= 0) ? 1 : -1;
340 int s1_error = 2 * s1_dy - s1_dx;
343 int s2_current_x = x1;
344 int s2_current_y = y1;
345 bool s2_axis_swap =
false;
346 int s2_dx = abs(x3 - x1);
347 int s2_dy = abs(y3 - y1);
348 int s2_sign_x = ((x3 - x1) >= 0) ? 1 : -1;
349 int s2_sign_y = ((y3 - y1) >= 0) ? 1 : -1;
356 int s2_error = 2 * s2_dy - s2_dx;
359 for (
int i = 0; i <= s1_dx; i++) {
360 if (s1_current_x <= s2_current_x) {
361 this->
horizontal_line(s1_current_x, s1_current_y, s2_current_x - s1_current_x + 1, color);
363 this->
horizontal_line(s2_current_x, s2_current_y, s1_current_x - s2_current_x + 1, color);
368 while (s1_error >= 0) {
370 s1_current_x += s1_sign_x;
372 s1_current_y += s1_sign_y;
374 s1_error = s1_error - 2 * s1_dx;
377 s1_current_y += s1_sign_y;
379 s1_current_x += s1_sign_x;
381 s1_error = s1_error + 2 * s1_dy;
385 while (s2_current_y != s1_current_y) {
386 while (s2_error >= 0) {
388 s2_current_x += s2_sign_x;
390 s2_current_y += s2_sign_y;
392 s2_error = s2_error - 2 * s2_dx;
395 s2_current_y += s2_sign_y;
397 s2_current_x += s2_sign_x;
399 s2_error = s2_error + 2 * s2_dy;
409 }
else if (y1 == y2) {
412 int x_temp = (int) (x1 + ((
float) (y2 - y1) / (
float) (y3 - y1)) * (x3 - x1)), y_temp = y2;
419 float rotation_degrees) {
426 float rotation_radians = rotation_degrees * PI / 180;
434 float vertex_angle = ((float) vertex_id) / edges * 2 * PI + rotation_radians;
435 *vertex_x = (int) round(cos(vertex_angle) * radius) + center_x;
436 *vertex_y = (int) round(sin(vertex_angle) * radius) + center_y;
443 int previous_vertex_x, previous_vertex_y;
444 for (
int current_vertex_id = 0; current_vertex_id <= edges; current_vertex_id++) {
445 int current_vertex_x, current_vertex_y;
447 variation, rotation_degrees);
448 if (current_vertex_id > 0) {
450 this->
filled_triangle(x, y, previous_vertex_x, previous_vertex_y, current_vertex_x, current_vertex_y, color);
452 this->
line(previous_vertex_x, previous_vertex_y, current_vertex_x, current_vertex_y, color);
455 previous_vertex_x = current_vertex_x;
456 previous_vertex_y = current_vertex_y;
468 float rotation_degrees,
Color color) {
480 int x_start, y_start;
482 this->
get_text_bounds(x, y, text, font, align, &x_start, &y_start, &width, &height);
483 font->
print(x_start, y_start,
this, color, text, background);
489 int ret = vsnprintf(buffer,
sizeof(buffer), format, arg);
491 this->
print(x, y, font, color, align, buffer, background);
526 image->
draw(x, y,
this, color_on, color_off);
536 qr_code->
draw(
this, x, y, color_on, scale);
538 #endif // USE_QR_CODE 540 #ifdef USE_GRAPHICAL_DISPLAY_MENU 542 Rect rect(x, y, width, height);
543 menu->
draw(
this, &rect);
545 #endif // USE_GRAPHICAL_DISPLAY_MENU 548 int *width,
int *height) {
549 int x_offset, baseline;
550 font->
measure(text, width, &x_offset, &baseline, height);
552 auto x_align =
TextAlign(
int(align) & 0x18);
553 auto y_align =
TextAlign(
int(align) & 0x07);
560 *x1 = x - (*width) / 2;
577 *y1 = y - (*height) / 2;
589 this->
print(x, y, font, COLOR_ON, align, text);
597 va_start(arg, format);
598 this->
vprintf_(x, y, font, color, background, align, format, arg);
603 va_start(arg, format);
604 this->
vprintf_(x, y, font, color, COLOR_OFF, align, format, arg);
609 va_start(arg, format);
615 va_start(arg, format);
616 this->
vprintf_(x, y, font, COLOR_ON, COLOR_OFF, align, format, arg);
621 va_start(arg, format);
627 for (
auto *page : pages)
628 page->set_parent(
this);
630 for (uint32_t i = 0; i < pages.size() - 1; i++) {
631 pages[i]->set_next(pages[i + 1]);
632 pages[i + 1]->set_prev(pages[i]);
634 pages[0]->set_prev(pages[pages.size() - 1]);
635 pages[pages.size() - 1]->set_next(pages[0]);
654 }
else if (this->
page_ !=
nullptr) {
662 if ((this->from_ ==
nullptr || this->from_ == from) && (this->to_ ==
nullptr || this->to_ == to))
663 this->trigger(from, to);
668 size_t ret = time.
strftime(buffer,
sizeof(buffer), format);
670 this->
print(x, y, font, color, align, buffer, background);
673 this->
strftime(x, y, font, color, COLOR_OFF, align, format, time);
679 this->
strftime(x, y, font, COLOR_ON, COLOR_OFF, align, format, time);
694 ESP_LOGE(TAG,
"clear: Clipping is not set.");
701 ESP_LOGE(TAG,
"add: Clipping is not set.");
708 ESP_LOGE(TAG,
"add: Clipping is not set.");
729 min_x = std::max(x, 0);
730 max_x = std::min(x + w, this->
get_width());
737 min_x = std::max(min_x, (
int) rect.x);
738 max_x = std::min(max_x, (
int) rect.x2());
741 return min_x < max_x;
744 min_y = std::max(y, 0);
752 min_y = std::max(min_y, (
int) rect.y);
753 max_y = std::min(max_y, (
int) rect.y2());
756 return min_y < max_y;
759 const uint8_t TESTCARD_FONT[3][8]
PROGMEM = {{0x41, 0x7F, 0x7F, 0x09, 0x19, 0x7F, 0x66, 0x00},
760 {0x1C, 0x3E, 0x63, 0x41, 0x51, 0x73, 0x72, 0x00},
761 {0x41, 0x7F, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00}};
768 Color r(255, 0, 0), g(0, 255, 0), b(0, 0, 255);
769 image_w = std::min(w - 20, 310);
770 image_h = std::min(
h - 20, 255);
772 int shift_x = (w - image_w) / 2;
773 int shift_y = (
h - image_h) / 2;
774 int line_w = (image_w - 6) / 6;
775 int image_c = image_w / 2;
776 for (
auto i = 0; i <= image_h; i++) {
777 int c = esp_scale(i, image_h);
778 this->
horizontal_line(shift_x + 0, shift_y + i, line_w, r.fade_to_white(c));
779 this->
horizontal_line(shift_x + line_w, shift_y + i, line_w, r.fade_to_black(c));
781 this->
horizontal_line(shift_x + image_c - line_w, shift_y + i, line_w, g.fade_to_white(c));
782 this->
horizontal_line(shift_x + image_c, shift_y + i, line_w, g.fade_to_black(c));
787 this->
rectangle(shift_x, shift_y, image_w, image_h,
Color(127, 127, 0));
789 uint16_t shift_r = shift_x + line_w - (8 * 3);
790 uint16_t shift_g = shift_x + image_c - (8 * 3);
791 uint16_t shift_b = shift_x + image_w - line_w - (8 * 3);
792 shift_y =
h / 2 - (8 * 3);
793 for (
auto i = 0; i < 8; i++) {
797 for (
auto k = 0; k < 8; k++) {
798 if ((ftr & (1 << k)) != 0) {
799 this->
filled_rectangle(shift_r + (i * 6), shift_y + (k * 6), 6, 6, COLOR_OFF);
801 if ((ftg & (1 << k)) != 0) {
802 this->
filled_rectangle(shift_g + (i * 6), shift_y + (k * 6), 6, 6, COLOR_OFF);
804 if ((ftb & (1 << k)) != 0) {
805 this->
filled_rectangle(shift_b + (i * 6), shift_y + (k * 6), 6, 6, COLOR_OFF);
827 return LOG_STR(
"TOP_LEFT");
829 return LOG_STR(
"TOP_CENTER");
831 return LOG_STR(
"TOP_RIGHT");
833 return LOG_STR(
"CENTER_LEFT");
835 return LOG_STR(
"CENTER");
837 return LOG_STR(
"CENTER_RIGHT");
839 return LOG_STR(
"BASELINE_LEFT");
841 return LOG_STR(
"BASELINE_CENTER");
843 return LOG_STR(
"BASELINE_RIGHT");
845 return LOG_STR(
"BOTTOM_LEFT");
847 return LOG_STR(
"BOTTOM_CENTER");
849 return LOG_STR(
"BOTTOM_RIGHT");
851 return LOG_STR(
"UNKNOWN");
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 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.
optional< display_writer_t > writer_
std::vector< DisplayOnPageChangeTrigger * > on_page_change_triggers_
void set_pages(std::vector< DisplayPage *> pages)
bool clamp_x_(int x, int w, int &min_x, int &max_x)
void sort_triangle_points_by_y_(int *x1, int *y1, int *x2, int *y2, int *x3, int *y3)
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...
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.
void set_next(DisplayPage *next)
void set_parent(Display *parent)
Color fade_to_black(uint8_t amnt)
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...
A more user-friendly version of struct tm from time.h.
void set_rotation(DisplayRotation rotation)
Internal method to set the display rotation with.
const uint8_t TESTCARD_FONT [3][8] PROGMEM
Color fade_to_white(uint8_t amnt)
const Color COLOR_OFF(0, 0, 0, 0)
Turn the pixel OFF.
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.
void shrink_clipping(Rect rect)
substract a rectangular region to the invalidation region
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 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,y3] with the given color.
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...
virtual void fill(Color color)
Fill the entire screen with the given color.
DisplayPage(display_writer_t writer)
Rect get_clipping() const
Get the current the clipping rectangle.
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.
virtual int get_width()
Get the calculated width of the display in pixels with rotation applied.
const float ROTATION_270_DEGREES
bool clamp_y_(int y, int h, int &min_y, int &max_y)
virtual void draw(int x, int y, Display *display, Color color_on, Color color_off)=0
const display_writer_t & get_writer() const
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 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+...
virtual void print(int x, int y, Display *display, Color color, const char *text, Color background)=0
TextAlign
TextAlign is used to tell the display class how to position a piece of text.
std::function< void(Display &)> display_writer_t
void process(DisplayPage *from, DisplayPage *to)
void start_clipping(Rect rect)
Set the clipping rectangle for further drawing.
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...
ImageAlign
ImageAlign is used to tell the display class how to position a image.
void clear()
Clear the entire screen by filling it with OFF pixels.
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 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 draw_legend(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color)
const float ROTATION_0_DEGREES
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.
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 menu(int x, int y, graphical_display_menu::GraphicalDisplayMenu *menu, int width, int height)
void draw(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color, int scale)
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 vprintf_(int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format, va_list arg)
DisplayRotation rotation_
void end_clipping()
Reset the invalidation region.
virtual int get_height()
Get the calculated height of the display in pixels with rotation applied.
DisplayPage * previous_page_
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.
uint8_t progmem_read_byte(const uint8_t *addr)
const Color COLOR_ON(255, 255, 255, 255)
Turn the pixel ON.
const LogString * text_align_to_string(TextAlign textalign)
virtual DisplayType get_display_type()=0
Get the type of display that the buffer corresponds to.
virtual int get_width() const =0
bool clip(int x, int y)
Check if pixel is within region of display.
void draw_pixel_at(int x, int y)
Set a single pixel at the specified coordinates to default color.
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,y] with font.
Implementation of SPI Controller mode.
static Color to_color(uint32_t colorcode, ColorOrder color_order, ColorBitness color_bitness=ColorBitness::COLOR_BITNESS_888, bool right_bit_aligned=true)
void draw(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color)
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...
virtual void measure(const char *str, int *width, int *x_offset, int *baseline, int *height)=0
std::vector< Rect > clipping_rectangle_
void set_writer(display_writer_t &&writer)
Internal method to set the display writer lambda.
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.
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 show_page(DisplayPage *page)
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...
virtual void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorOrder order, 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 set_prev(DisplayPage *prev)
virtual int get_height() const =0
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...