diff --git a/libs/canvas/types.cc b/libs/canvas/types.cc index 6d6d4e08c1..be5670716a 100644 --- a/libs/canvas/types.cc +++ b/libs/canvas/types.cc @@ -39,7 +39,60 @@ ArdourCanvas::operator<< (ostream & s, Duple const & r) ostream & ArdourCanvas::operator<< (ostream & s, Rect const & r) { - s << "[(" << r.x0 << ", " << r.y0 << "), (" << r.x1 << ", " << r.y1 << ") " << r.width() << " x " << r.height() << "]"; + static const Coord BIG = COORD_MAX/10.0; /* 1 order of magnitude from COORD_MAX */ + + const Distance w = r.width(); + const Distance h = r.height(); + + s << "[("; + + if (r.x0 > BIG) { + s << "BIG"; + } else { + s << r.x0; + } + + s << ", "; + + if (r.y0 > BIG) { + s << "BIG"; + } else { + s << r.y0; + } + + s << "), ("; + + + if (r.x1 > BIG) { + s << "BIG"; + } else { + s << r.x1; + } + + s << ", "; + + if (r.y1 > BIG) { + s << "BIG"; + } else { + s << r.y1; + } + + s << ") "; + + if (w > BIG) { + s << "BIG"; + } else { + s << w; + } + + s << " x "; + + if (h > BIG) { + s << "BIG"; + } else { + s << h; + } + + s << ']'; return s; } -