add GPLv2 to exec_wrapper
[ardour.git] / libs / canvas / types.cc
index 9d8ed05622f0c8f298866113cdb085a40097a18a..4fd064d7467b1f844847207b6006e85da02ad0cd 100644 (file)
@@ -95,8 +95,8 @@ Rect
 Rect::expand (Distance amount) const
 {
        Rect r;
-       r.x0 = max (0.0, x0 - amount);
-       r.y0 = max (0.0, y0 - amount);
+       r.x0 = x0 - amount;
+       r.y0 = y0 - amount;
        r.x1 = safe_add (x1, amount);
        r.y1 = safe_add (y1, amount);
        return r;
@@ -121,6 +121,16 @@ Rect::fix () const
        return r;
 }
 
+bool
+ArdourCanvas::operator!= (Rect const& a, Rect const& b)
+{
+       return a.x0 != b.x0 ||
+               a.x1 != b.x1 ||
+               a.y0 != b.y0 ||
+               a.y1 != b.y1;
+}
+
+
 Duple
 ArdourCanvas::operator- (Duple const & o)
 {
@@ -139,6 +149,12 @@ ArdourCanvas::operator== (Duple const & a, Duple const & b)
        return a.x == b.x && a.y == b.y;
 }
 
+bool
+ArdourCanvas::operator!= (Duple const & a, Duple const & b)
+{
+       return a.x != b.x || a.y != b.y;
+}
+
 Duple
 ArdourCanvas::operator- (Duple const & a, Duple const & b)
 {