Canvas::Rect::contains() should treat its right/left coordinates as exclusive
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 12 Feb 2015 02:35:59 +0000 (21:35 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 12 Feb 2015 02:59:38 +0000 (21:59 -0500)
libs/canvas/canvas/types.h

index 4cba0846371c2194d8a8e9422baae4fea648a267..dbd9683b75585a2dd6c8d69f3d32001627a8ac30 100644 (file)
@@ -152,7 +152,7 @@ struct LIBCANVAS_API Rect
        }
                
        bool contains (Duple const & point) const throw () {
-               return point.x >= x0 && point.x <= x1 && point.y >= y0 && point.y <= y1;
+               return point.x >= x0 && point.x < x1 && point.y >= y0 && point.y < y1;
        }
        Rect fix () const throw () {
                return Rect (std::min (x0, x1), std::min (y0, y1),