16 Rect() :
x(VALUE_NO_SET),
y(VALUE_NO_SET),
w(VALUE_NO_SET),
h(VALUE_NO_SET) {}
17 inline Rect(int16_t
x, int16_t
y, int16_t
w, int16_t
h) ESPHOME_ALWAYS_INLINE :
x(
x),
y(
y),
w(
w),
h(
h) {}
18 inline int16_t
x2()
const {
return this->x + this->
w; };
19 inline int16_t
y2()
const {
return this->y + this->
h; };
21 inline bool is_set() const ESPHOME_ALWAYS_INLINE {
return (this->h != VALUE_NO_SET) && (this->w != VALUE_NO_SET); }
23 void expand(int16_t horizontal, int16_t vertical);
29 bool inside(int16_t test_x, int16_t test_y,
bool absolute =
true)
const;
31 void info(
const std::string &prefix =
"rect info:");