private void ExecuteVignette(XmlElement element, MagickImage image)
{
Hashtable arguments = new Hashtable();
foreach (XmlAttribute attribute in element.Attributes)
{
if (attribute.Name == "radius")
arguments["radius"] = Variables.GetValue<double>(attribute);
else if (attribute.Name == "sigma")
arguments["sigma"] = Variables.GetValue<double>(attribute);
else if (attribute.Name == "x")
arguments["x"] = Variables.GetValue<Int32>(attribute);
else if (attribute.Name == "y")
arguments["y"] = Variables.GetValue<Int32>(attribute);
}
if (arguments.Count == 0)
image.Vignette();
else if (OnlyContains(arguments, "radius", "sigma", "x", "y"))
image.Vignette((double)arguments["radius"], (double)arguments["sigma"], (Int32)arguments["x"], (Int32)arguments["y"]);
else
throw new ArgumentException("Invalid argument combination for 'vignette', allowed combinations are: [] [radius, sigma, x, y]");
}
private void ExecuteWave(XmlElement element, MagickImage image)