private void ExecuteSwirl(XmlElement element, MagickImage image)
{
Hashtable arguments = new Hashtable();
foreach (XmlAttribute attribute in element.Attributes)
{
if (attribute.Name == "degrees")
arguments["degrees"] = Variables.GetValue<double>(attribute);
else if (attribute.Name == "method")
arguments["method"] = Variables.GetValue<PixelInterpolateMethod>(attribute);
}
if (OnlyContains(arguments, "degrees"))
image.Swirl((double)arguments["degrees"]);
else if (OnlyContains(arguments, "method", "degrees"))
image.Swirl((PixelInterpolateMethod)arguments["method"], (double)arguments["degrees"]);
else
throw new ArgumentException("Invalid argument combination for 'swirl', allowed combinations are: [degrees] [method, degrees]");
}
private void ExecuteTexture(XmlElement element, MagickImage image)