ImageMagick.MagickScript.ExecuteSpread C# (CSharp) Method

ExecuteSpread() private method

private ExecuteSpread ( XmlElement element, MagickImage image ) : void
element XmlElement
image MagickImage
return void
    private void ExecuteSpread(XmlElement element, MagickImage image)
    {
      Hashtable arguments = new Hashtable();
      foreach (XmlAttribute attribute in element.Attributes)
      {
        if (attribute.Name == "method")
          arguments["method"] = Variables.GetValue<PixelInterpolateMethod>(attribute);
        else if (attribute.Name == "radius")
          arguments["radius"] = Variables.GetValue<double>(attribute);
      }
      if (arguments.Count == 0)
        image.Spread();
      else if (OnlyContains(arguments, "method", "radius"))
        image.Spread((PixelInterpolateMethod)arguments["method"], (double)arguments["radius"]);
      else if (OnlyContains(arguments, "radius"))
        image.Spread((double)arguments["radius"]);
      else
        throw new ArgumentException("Invalid argument combination for 'spread', allowed combinations are: [] [method, radius] [radius]");
    }
    private void ExecuteStatistic(XmlElement element, MagickImage image)
MagickScript