summaryrefslogtreecommitdiff
path: root/libs/canvas/types.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-03-11 07:36:09 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-03-11 07:36:09 -0400
commitc2946ee00f6b5ec8205dd2fcb5b6d2ace2907436 (patch)
treea9d088f0e42209e0bab50686a54ac12290fbe776 /libs/canvas/types.cc
parent495c0de4ac2e5292a2ebaf276e57cb30fea414db (diff)
don't queue redraws when various canvas item properties are "reset" to the same value, plus supporting functions
Diffstat (limited to 'libs/canvas/types.cc')
-rw-r--r--libs/canvas/types.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/canvas/types.cc b/libs/canvas/types.cc
index 7d7a495df5..4fd064d746 100644
--- a/libs/canvas/types.cc
+++ b/libs/canvas/types.cc
@@ -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)
{