private void ExecutePathSmoothCurveToAbs(XmlElement element, Collection<IPath> paths)
{
Hashtable arguments = new Hashtable();
foreach (XmlAttribute attribute in element.Attributes)
{
if (attribute.Name == "controlPoint")
arguments["controlPoint"] = Variables.GetValue<PointD>(attribute);
else if (attribute.Name == "end")
arguments["end"] = Variables.GetValue<PointD>(attribute);
else if (attribute.Name == "x")
arguments["x"] = Variables.GetValue<double>(attribute);
else if (attribute.Name == "x2")
arguments["x2"] = Variables.GetValue<double>(attribute);
else if (attribute.Name == "y")
arguments["y"] = Variables.GetValue<double>(attribute);
else if (attribute.Name == "y2")
arguments["y2"] = Variables.GetValue<double>(attribute);
}
if (OnlyContains(arguments, "controlPoint", "end"))
paths.Add(new PathSmoothCurveToAbs((PointD)arguments["controlPoint"], (PointD)arguments["end"]));
else if (OnlyContains(arguments, "x2", "y2", "x", "y"))
paths.Add(new PathSmoothCurveToAbs((double)arguments["x2"], (double)arguments["y2"], (double)arguments["x"], (double)arguments["y"]));
else
throw new ArgumentException("Invalid argument combination for 'smoothCurveToAbs', allowed combinations are: [controlPoint, end] [x2, y2, x, y]");
}
private void ExecutePathSmoothCurveToRel(XmlElement element, Collection<IPath> paths)