New helper for testing if rect inside another rect
This commit is contained in:
@@ -63,6 +63,11 @@ struct rect_t
|
|||||||
{
|
{
|
||||||
return (x >= this->x && x < this->x + this->w && y >= this->y && y < this->y + this->h);
|
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;
|
typedef uint32_t LcdFlags;
|
||||||
|
|||||||
Reference in New Issue
Block a user