if (bounds.isAngleOnly()) {
double angle = bounds.getAngle();
node.setAttribute(AngleTag, Double.toString(angle));
}
else {
XmlNode ulNode = node.addChild(ULtag);
Point2D ul = bounds.getUpperLeft();
ulNode.setAttribute(Xtag, Double.toString(ul.getX()));
ulNode.setAttribute(Ytag, Double.toString(ul.getY()));
XmlNode urNode = node.addChild(URtag);
Point2D ur = bounds.getUpperRight();
urNode.setAttribute(Xtag, Double.toString(ur.getX()));
urNode.setAttribute(Ytag, Double.toString(ur.getY()));
XmlNode llNode = node.addChild(LLtag);
Point2D ll = bounds.getLowerLeft();
llNode.setAttribute(Xtag, Double.toString(ll.getX()));
llNode.setAttribute(Ytag, Double.toString(ll.getY()));
XmlNode lrNode = node.addChild(LRtag);
Point2D lr = bounds.getLowerRight();
lrNode.setAttribute(Xtag, Double.toString(lr.getX()));
lrNode.setAttribute(Ytag, Double.toString(lr.getY()));
}
}