32 pt_in_rect(
const Gdk::Point &point,
const Gdk::Rectangle &rect)
34 return (point.get_x() >= rect.get_x() &&
35 point.get_x() < rect.get_x() + rect.get_width() &&
36 point.get_y() >= rect.get_y() &&
37 point.get_y() < rect.get_y() + rect.get_height());
44 max(a.get_x(), b.get_x()) <
45 min(a.get_x() + a.get_width(), b.get_x() + b.get_width())
47 max(a.get_y(), b.get_y()) <
48 min(a.get_y() + a.get_height(), b.get_y() + b.get_height())
bool rects_overlap(Gdk::Rectangle const &a, Gdk::Rectangle const &b)
determine whether two rectangles overlap
Helper functions to work with rectangular screen ranges.
bool pt_in_rect(const Gdk::Point &point, const Gdk::Rectangle &rect)
determine whether point is within the bounding box of a rectangle
Lumiera GTK UI implementation root.