diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-05 11:27:26 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-05 11:27:26 -0400 |
commit | 07a505b1b271f64a1ffb2da32da0548d32cd13de (patch) | |
tree | 82b5d1ac8a5e825791fbfcc5789f6fa0aba290ae /libs/canvas/types.cc | |
parent | 7db5d68cdb1c7b6138907cb732e913ec91212e13 (diff) |
lots of tweaking and adding debug output including operator<</dump(ostream&) methods to help visualize canvas structure
Diffstat (limited to 'libs/canvas/types.cc')
-rw-r--r-- | libs/canvas/types.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/canvas/types.cc b/libs/canvas/types.cc index 56312741cf..8d7fbf1c27 100644 --- a/libs/canvas/types.cc +++ b/libs/canvas/types.cc @@ -13,7 +13,7 @@ Coord const ArdourCanvas::CAIRO_MAX = 65536; static inline Coord safe_add (Coord a, Coord b) { - if (((COORD_MAX - a) > b) || ((COORD_MAX - b) > a)) { + if (((COORD_MAX - a) <= b) || ((COORD_MAX - b) <= a)) { return COORD_MAX; } @@ -135,7 +135,7 @@ ArdourCanvas::operator<< (ostream & s, Duple const & r) ostream & ArdourCanvas::operator<< (ostream & s, Rect const & r) { - s << "[(" << r.x0 << ", " << r.y0 << "), (" << r.x1 << ", " << r.y1 << ")]"; + s << "[(" << r.x0 << ", " << r.y0 << "), (" << r.x1 << ", " << r.y1 << ") " << r.width() << " x " << r.height() << "]"; return s; } |