ESPHome
2023.5.5
|
#include <display_buffer.h>
Public Member Functions | |
Rect () | |
Rect (int16_t x, int16_t y, int16_t w, int16_t h) ALWAYS_INLINE | |
int16_t | x2 () |
int16_t | y2 () |
X coordinate of corner. More... | |
bool | is_set () ALWAYS_INLINE |
Y coordinate of corner. More... | |
void | expand (int16_t horizontal, int16_t vertical) |
void | extend (Rect rect) |
void | shrink (Rect rect) |
bool | inside (Rect rect, bool absolute=true) |
bool | inside (int16_t test_x, int16_t test_y, bool absolute=true) |
bool | equal (Rect rect) |
void | info (const std::string &prefix="rect info:") |
Data Fields | |
int16_t | x |
X coordinate of corner. More... | |
int16_t | y |
Y coordinate of corner. More... | |
int16_t | w |
Width of region. More... | |
int16_t | h |
Height of region. More... | |
Definition at line 104 of file display_buffer.h.
|
inline |
Definition at line 111 of file display_buffer.h.
|
inline |
Definition at line 112 of file display_buffer.h.
bool esphome::display::Rect::equal | ( | Rect | rect | ) |
Definition at line 71 of file display_buffer.cpp.
void esphome::display::Rect::expand | ( | int16_t | horizontal, |
int16_t | vertical | ||
) |
Definition at line 18 of file display_buffer.cpp.
void esphome::display::Rect::extend | ( | Rect | rect | ) |
Definition at line 27 of file display_buffer.cpp.
void esphome::display::Rect::info | ( | const std::string & | prefix = "rect info:" | ) |
Definition at line 97 of file display_buffer.cpp.
bool esphome::display::Rect::inside | ( | Rect | rect, |
bool | absolute = true |
||
) |
Definition at line 86 of file display_buffer.cpp.
bool esphome::display::Rect::inside | ( | int16_t | test_x, |
int16_t | test_y, | ||
bool | absolute = true |
||
) |
Definition at line 75 of file display_buffer.cpp.
|
inline |
Y coordinate of corner.
Definition at line 116 of file display_buffer.h.
void esphome::display::Rect::shrink | ( | Rect | rect | ) |
Definition at line 50 of file display_buffer.cpp.
|
inline |
Definition at line 113 of file display_buffer.h.
|
inline |
X coordinate of corner.
Definition at line 114 of file display_buffer.h.
int16_t esphome::display::Rect::h |
Height of region.
Definition at line 109 of file display_buffer.h.
int16_t esphome::display::Rect::w |
Width of region.
Definition at line 108 of file display_buffer.h.
int16_t esphome::display::Rect::x |
X coordinate of corner.
Definition at line 106 of file display_buffer.h.
int16_t esphome::display::Rect::y |
Y coordinate of corner.
Definition at line 107 of file display_buffer.h.