New helper for testing if rect inside another rect

This commit is contained in:
Bertrand Songis
2020-03-18 15:18:44 +01:00
parent 74fa59ebec
commit c79b7c8ee6
+5
View File
@@ -63,6 +63,11 @@ struct rect_t
{
return (x >= this->x && x < this->x + this->w && y >= this->y && y < this->y + this->h);
}
bool contains(const rect_t & other) const
{
return left() <= other.left() && right() >= other.right() && top() <= other.top() && bottom() >= other.bottom();
}
};
typedef uint32_t LcdFlags;