diff --git a/os/include/util/geometry.h b/os/include/util/geometry.h index e38fd9898..75606e07b 100644 --- a/os/include/util/geometry.h +++ b/os/include/util/geometry.h @@ -135,6 +135,12 @@ class Genode::Rect */ bool fits(Area
area) const { return w() >= area.w() && h() >= area.h(); } + /** + * Return true if the specified point lies within the rectangle + */ + bool contains(Point p) const { + return p.x() >= x1() && p.x() <= x2() && p.y() >= y1() && p.y() <= y2(); } + /** * Create new rectangle by intersecting two rectangles */