X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Frect.cc;h=7ec5c2c4487378c36a8ac62d509902d13d8c0ea7;hb=6a73cff16d94526cb5b187ab57ee8a3429906bcc;hp=bf34970d45534bda764094c5a65447a6aeb452b6;hpb=00b96c7846e715698d0f635887a3eff009deb0c8;p=chaz%2Fopenbox diff --git a/otk/rect.cc b/otk/rect.cc index bf34970d..7ec5c2c4 100644 --- a/otk/rect.cc +++ b/otk/rect.cc @@ -1,3 +1,9 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #include "rect.hh" namespace otk { @@ -130,6 +136,12 @@ bool Rect::contains(int x, int y) const } +bool Rect::contains(const Point &p) const +{ + return contains(p.x(), p.y()); +} + + bool Rect::contains(const Rect& a) const { return a._x1 >= _x1 && a._x2 <= _x2 &&