|
ESPHome 2026.11.0-dev
|
Data Structures | |
| class | BaseFont |
| class | BaseImage |
| class | ColorUtil |
| class | Display |
| class | DisplayBuffer |
| class | DisplayPage |
| class | DisplayPageShowAction |
| class | DisplayWriter |
| Optimized display writer that uses function pointers for stateless lambdas. More... | |
| class | Rect |
| class | Rgb565ToMono |
| color_to_mono() of an RGB565 value as ColorUtil::to_color() reads it, from table lookups instead of a division per channel. More... | |
Typedefs | |
| using | display_writer_t = DisplayWriter<Display> |
Enumerations | |
| enum class | TextAlign { TOP = 0x00 , CENTER_VERTICAL = 0x01 , BASELINE = 0x02 , BOTTOM = 0x04 , LEFT = 0x00 , CENTER_HORIZONTAL = 0x08 , RIGHT = 0x10 , TOP_LEFT = TOP | LEFT , TOP_CENTER = TOP | CENTER_HORIZONTAL , TOP_RIGHT = TOP | RIGHT , CENTER_LEFT = CENTER_VERTICAL | LEFT , CENTER = CENTER_VERTICAL | CENTER_HORIZONTAL , CENTER_RIGHT = CENTER_VERTICAL | RIGHT , BASELINE_LEFT = BASELINE | LEFT , BASELINE_CENTER = BASELINE | CENTER_HORIZONTAL , BASELINE_RIGHT = BASELINE | RIGHT , BOTTOM_LEFT = BOTTOM | LEFT , BOTTOM_CENTER = BOTTOM | CENTER_HORIZONTAL , BOTTOM_RIGHT = BOTTOM | RIGHT } |
| TextAlign is used to tell the display class how to position a piece of text. More... | |
| enum class | ImageAlign { TOP = 0x00 , CENTER_VERTICAL = 0x01 , BOTTOM = 0x02 , LEFT = 0x00 , CENTER_HORIZONTAL = 0x04 , RIGHT = 0x08 , TOP_LEFT = TOP | LEFT , TOP_CENTER = TOP | CENTER_HORIZONTAL , TOP_RIGHT = TOP | RIGHT , CENTER_LEFT = CENTER_VERTICAL | LEFT , CENTER = CENTER_VERTICAL | CENTER_HORIZONTAL , CENTER_RIGHT = CENTER_VERTICAL | RIGHT , BOTTOM_LEFT = BOTTOM | LEFT , BOTTOM_CENTER = BOTTOM | CENTER_HORIZONTAL , BOTTOM_RIGHT = BOTTOM | RIGHT , HORIZONTAL_ALIGNMENT = LEFT | CENTER_HORIZONTAL | RIGHT , VERTICAL_ALIGNMENT = TOP | CENTER_VERTICAL | BOTTOM } |
| ImageAlign is used to tell the display class how to position a image. More... | |
| enum | DisplayType { DISPLAY_TYPE_BINARY = 1 , DISPLAY_TYPE_GRAYSCALE = 2 , DISPLAY_TYPE_COLOR = 3 } |
| enum | DisplayRotation { DISPLAY_ROTATION_0_DEGREES = 0 , DISPLAY_ROTATION_90_DEGREES = 90 , DISPLAY_ROTATION_180_DEGREES = 180 , DISPLAY_ROTATION_270_DEGREES = 270 } |
| enum | RegularPolygonVariation { VARIATION_POINTY_TOP = 0 , VARIATION_FLAT_TOP = 1 } |
| enum | RegularPolygonDrawing { DRAWING_OUTLINE = 0 , DRAWING_FILLED = 1 } |
| enum | ColorOrder : uint8_t { COLOR_ORDER_RGB = 0 , COLOR_ORDER_BGR = 1 , COLOR_ORDER_GRB = 2 } |
| enum | ColorBitness : uint8_t { COLOR_BITNESS_888 = 0 , COLOR_BITNESS_565 = 1 , COLOR_BITNESS_332 = 2 } |
Functions | |
| ESPHOME_LOG_TAG (TAG, "display") | |
| if (display->pixel_axes_swapped()) | |
| for (int y=0;y !=h;y++) | |
| const LogString * | text_align_to_string (TextAlign textalign) |
| constexpr bool | rotation_swaps_axes (DisplayRotation rotation) |
| Whether a rotation swaps the x and y axes. | |
| constexpr Color | COLOR_OFF (0, 0, 0, 0) |
| Turn the pixel OFF. | |
| constexpr Color | COLOR_ON (255, 255, 255, 255) |
| Turn the pixel ON. | |
| constexpr uint8_t | expand_field (uint8_t value, uint8_t bits) |
| esp_scale(value, (1 << bits) - 1) for a field of 2, 3, 5, 6 or 8 bits, as a multiply and shift that gives the same result for every field value. | |
| Color | apply_color_order (Color color, ColorOrder order) |
| constexpr uint8_t | rec601_luma (Color color) |
| Rec.601 luma of an RGB color, for optimum perceptual brightness. | |
| constexpr uint8_t | color_to_mono (Color color) |
| Map an RGB color to a single monochrome bit: 1 = white, 0 = black. | |
Variables | |
| static void int | x_start |
| static void int int | y_start |
| static void int int int | w |
| 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 | x_offset |
| static void int int int int const uint8_t int int | y_offset |
| static void int int int int const uint8_t int int int | x_pad |
| const auto | draw_source_pixel |
| static void int int int int const uint8_t ColorOrder | order |
| static void int int int int const uint8_t ColorOrder ColorBitness | bitness |
| static void int int int int const uint8_t ColorOrder ColorBitness bool | big_endian |
| constexpr uint8_t TESTCARD_FONT[3][8] | PROGMEM |
| const int | EDGES_TRIGON = 3 |
| const int | EDGES_TRIANGLE = 3 |
| const int | EDGES_TETRAGON = 4 |
| const int | EDGES_QUADRILATERAL = 4 |
| const int | EDGES_PENTAGON = 5 |
| const int | EDGES_HEXAGON = 6 |
| const int | EDGES_HEPTAGON = 7 |
| const int | EDGES_OCTAGON = 8 |
| const int | EDGES_NONAGON = 9 |
| const int | EDGES_ENNEAGON = 9 |
| const int | EDGES_DECAGON = 10 |
| const int | EDGES_HENDECAGON = 11 |
| const int | EDGES_DODECAGON = 12 |
| const int | EDGES_TRIDECAGON = 13 |
| const int | EDGES_TETRADECAGON = 14 |
| const int | EDGES_PENTADECAGON = 15 |
| const int | EDGES_HEXADECAGON = 16 |
| const float | ROTATION_0_DEGREES = 0.0 |
| const float | ROTATION_45_DEGREES = 45.0 |
| const float | ROTATION_90_DEGREES = 90.0 |
| const float | ROTATION_180_DEGREES = 180.0 |
| const float | ROTATION_270_DEGREES = 270.0 |
| enum esphome::display::ColorBitness : uint8_t |
| Enumerator | |
|---|---|
| COLOR_BITNESS_888 | |
| COLOR_BITNESS_565 | |
| COLOR_BITNESS_332 | |
Definition at line 9 of file display_color_utils.h.
| enum esphome::display::ColorOrder : uint8_t |
| Enumerator | |
|---|---|
| COLOR_ORDER_RGB | |
| COLOR_ORDER_BGR | |
| COLOR_ORDER_GRB | |
Definition at line 8 of file display_color_utils.h.
|
strong |
ImageAlign is used to tell the display class how to position a image.
By default the coordinates you enter for the image() functions take the upper left corner of the image as the "anchor" point. You can customize this behavior to, for example, make the coordinates refer to the center of the image.
All image alignments consist of an X and Y-coordinate alignment. For the alignment along the X-axis these options are allowed:
For the Y-Axis alignment these options are allowed:
These options are then combined to create combined TextAlignment options like:
|
strong |
TextAlign is used to tell the display class how to position a piece of text.
By default the coordinates you enter for the print*() functions take the upper left corner of the text as the "anchor" point. You can customize this behavior to, for example, make the coordinates refer to the center of the text.
All text alignments consist of an X and Y-coordinate alignment. For the alignment along the X-axis these options are allowed:
For the Y-Axis alignment these options are allowed:
These options are then combined to create combined TextAlignment options like:
|
inline |
Definition at line 33 of file display_color_utils.h.
|
inlineconstexpr |
Turn the pixel OFF.
|
inlineconstexpr |
Turn the pixel ON.
|
constexpr |
Map an RGB color to a single monochrome bit: 1 = white, 0 = black.
Definition at line 216 of file display_color_utils.h.
| esphome::display::ESPHOME_LOG_TAG | ( | TAG | , |
| "display" | ) |
|
constexpr |
esp_scale(value, (1 << bits) - 1) for a field of 2, 3, 5, 6 or 8 bits, as a multiply and shift that gives the same result for every field value.
With bits a constant this avoids a division.
Definition at line 14 of file display_color_utils.h.
Definition at line 89 of file display.cpp.
| esphome::display::if | ( | display-> | pixel_axes_swapped() | ) |
Definition at line 77 of file display.cpp.
|
constexpr |
Rec.601 luma of an RGB color, for optimum perceptual brightness.
Definition at line 211 of file display_color_utils.h.
|
constexpr |
| const LogString * esphome::display::text_align_to_string | ( | TextAlign | textalign | ) |
Definition at line 958 of file display.cpp.
| void int int int int const uint8_t ColorOrder ColorBitness bool esphome::display::big_endian |
Definition at line 101 of file display.cpp.
| void int int int int const uint8_t ColorOrder ColorBitness esphome::display::bitness |
Definition at line 100 of file display.cpp.
| const auto esphome::display::draw_source_pixel |
Definition at line 67 of file display.cpp.
| static void int int int int esphome::display::h |
Definition at line 62 of file display.cpp.
| void int int int int const uint8_t ColorOrder esphome::display::order |
Definition at line 100 of file display.cpp.
|
constexpr |
Definition at line 878 of file display.cpp.
| static void int int int int const uint8_t * esphome::display::ptr |
Definition at line 63 of file display.cpp.
| const float esphome::display::ROTATION_180_DEGREES = 180.0 |
| const float esphome::display::ROTATION_270_DEGREES = 270.0 |
| static void int int int esphome::display::w |
Definition at line 62 of file display.cpp.
| static void int int int int const uint8_t ColorOrder ColorBitness bool int esphome::display::x_offset |
Definition at line 63 of file display.cpp.
| static void int int int int const uint8_t ColorOrder ColorBitness bool int int int esphome::display::x_pad |
Definition at line 63 of file display.cpp.
| static void int esphome::display::x_start |
Definition at line 62 of file display.cpp.
| static void int int int int const uint8_t ColorOrder ColorBitness bool int int esphome::display::y_offset |
Definition at line 63 of file display.cpp.
| static void int int esphome::display::y_start |
Definition at line 62 of file display.cpp.