mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
lots of tweaking and adding debug output including operator<</dump(ostream&) methods to help visualize canvas structure
This commit is contained in:
parent
7db5d68cdb
commit
07a505b1b2
15 changed files with 188 additions and 23 deletions
|
|
@ -1,7 +1,10 @@
|
|||
#include <algorithm>
|
||||
|
||||
#include "pbd/xml++.h"
|
||||
#include "pbd/compose.h"
|
||||
|
||||
#include "canvas/poly_item.h"
|
||||
#include "canvas/canvas.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ArdourCanvas;
|
||||
|
|
@ -33,6 +36,7 @@ PolyItem::compute_bounding_box () const
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (!have_one) {
|
||||
_bounding_box = boost::optional<Rect> ();
|
||||
} else {
|
||||
|
|
@ -99,3 +103,14 @@ PolyItem::set_poly_item_state (XMLNode const * node)
|
|||
|
||||
_bounding_box_dirty = true;
|
||||
}
|
||||
|
||||
void
|
||||
PolyItem::dump (ostream& o) const
|
||||
{
|
||||
Item::dump (o);
|
||||
|
||||
o << _canvas->indent() << _points.size() << " points" << endl;
|
||||
for (Points::const_iterator i = _points.begin(); i != _points.end(); ++i) {
|
||||
o << i->x << ", " << i->y << endl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue