Action5017.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using PaintDotNet.Data.Param;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Drawing;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace PaintDotNet.Data.Action
  9. {
  10. /// <summary>
  11. /// 图片旋转
  12. /// </summary>
  13. public class Action5017 : ParamObject
  14. {
  15. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  16. {
  17. return Adjust.AdjustIntent.MatRotate(src, this.Lists);
  18. }
  19. public Action5017()
  20. {
  21. this.MenuId = ActionType.ActionImageRotate;
  22. this.OpenImage = "current";
  23. //第一个参数
  24. IntegerNumber one = new IntegerNumber(-360, 360);
  25. one.key = "Rotate";
  26. one.name = PdnResources.GetString("Menu.Imagerotation.text");/*PdnResources.GetString("Menu.hong.Text")*/;
  27. one.initialValue = 0;
  28. one.value = 0;
  29. ////第二个参数
  30. //DecimalNumber two = new DecimalNumber(-360, 360);
  31. //two.key = "Rotate";
  32. //two.name = PdnResources.GetString("Menu.Imagerotation.text");
  33. //two.DecimalPlaces = 2;
  34. //two.initialValue = 0.0;
  35. //two.value = 0.0;
  36. //lists.Add(two);
  37. ColorNumber phaseColor = new ColorNumber();
  38. phaseColor.key = "phaseColor";
  39. phaseColor.name = PdnResources.GetString("Menu.backgroundcolor.text");
  40. phaseColor.Value = Color.FromArgb(225,225,225).ToArgb();
  41. phaseColor.initialValue = Color.FromArgb(225, 225, 225).ToArgb();
  42. lists.Add(one);
  43. lists.Add(phaseColor);
  44. }
  45. }
  46. }