Action5022.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using PaintDotNet.Data.Param;
  2. namespace PaintDotNet.Data.Action
  3. {
  4. /// <summary>
  5. /// 虚化蒙版
  6. /// </summary>
  7. public class Action5022 : ParamObject
  8. {
  9. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  10. {
  11. return Adjust.AdjustIntent.BlurMaskFunction(src, this.Lists);
  12. }
  13. public Action5022()
  14. {
  15. this.MenuId = ActionType.ActionBlurMask;
  16. this.OpenImage = "current";
  17. //第一个参数
  18. DecimalNumber one = new DecimalNumber(0, 15);//1500
  19. one.key = "Radius";
  20. one.name = PdnResources.GetString("Menu.radius.text");
  21. one.DecimalPlaces = 3;
  22. one.initialValue = 0;
  23. one.value = 0;
  24. lists.Add(one);
  25. //第二个参数
  26. DecimalNumber two = new DecimalNumber(0, 300);
  27. two.key = "Amount";
  28. two.name = PdnResources.GetString("Menu.ImageProcessing.Sharpen.magnitude.text");
  29. two.DecimalPlaces = 1;
  30. two.initialValue = 0;
  31. two.value = 0;
  32. lists.Add(two);
  33. //第三个参数
  34. IntegerNumber three = new IntegerNumber(0, 255);
  35. three.key = "Threshold";
  36. three.name = PdnResources.GetString("Menu.Threshold.text");
  37. three.initialValue = 0;
  38. three.value = 0;
  39. lists.Add(three);
  40. }
  41. }
  42. }