remove all XML related API from canvas. it may have been useful during development, but it is just a distraction - we will NEVER be saving or restoring canvas state via XML or any kind of serialized state

This commit is contained in:
Paul Davis 2013-04-15 21:57:08 -04:00
parent fe34485907
commit 84fb0a8dce
39 changed files with 1 additions and 463 deletions

View file

@ -113,36 +113,3 @@ Line::set_y1 (Coord y1)
DEBUG_TRACE (PBD::DEBUG::CanvasItemsDirtied, "canvas item dirty: line change\n");
}
XMLNode *
Line::get_state () const
{
XMLNode* node = new XMLNode ("Line");
#ifdef CANVAS_DEBUG
if (!name.empty ()) {
node->add_property ("name", name);
}
#endif
node->add_property ("x0", string_compose ("%1", _points[0].x));
node->add_property ("y0", string_compose ("%1", _points[0].y));
node->add_property ("x1", string_compose ("%1", _points[1].x));
node->add_property ("y1", string_compose ("%1", _points[1].y));
add_item_state (node);
add_outline_state (node);
return node;
}
void
Line::set_state (XMLNode const * node)
{
_points[0].x = atof (node->property("x0")->value().c_str());
_points[0].y = atof (node->property("y0")->value().c_str());
_points[1].x = atof (node->property("x1")->value().c_str());
_points[1].y = atof (node->property("y1")->value().c_str());
set_item_state (node);
set_outline_state (node);
_bounding_box_dirty = true;
}