private void processViewBox(XmlNode workspaceNode)
{
XmlNode viewBox = tryGetNodeByName(workspaceNode.ChildNodes, "view_box");
if (viewBox != null)
{
if (viewBox.Attributes["min_x"].Value.Length != 0 &&
viewBox.Attributes["min_y"].Value.Length != 0 &&
viewBox.Attributes["max_x"].Value.Length != 0 &&
viewBox.Attributes["max_y"].Value.Length != 0)
{
double minX, minY, maxX, maxY;
minX = double.Parse(viewBox.Attributes["min_x"].Value, CultureInfo.InvariantCulture);
minY = double.Parse(viewBox.Attributes["min_y"].Value, CultureInfo.InvariantCulture);
maxX = double.Parse(viewBox.Attributes["max_x"].Value, CultureInfo.InvariantCulture);
maxY = double.Parse(viewBox.Attributes["max_y"].Value, CultureInfo.InvariantCulture);
_viewBox = new BoundingRectangle(minX, minY, maxX, maxY);
}
else
_viewBox = new BoundingRectangle();
}
}