using PaintDotNet.Adjust; using PaintDotNet.Data.Param; using System.Drawing; namespace PaintDotNet.Data.Action { /// /// 图像偏移 /// public class Action507 : ParamObject { public IntegerNumber one; public IntegerNumber two; public ColorNumber fillColor; public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src) { return GeometryIntent.ImageOffset(src, this.Lists); } public Action507() { this.MenuId = ActionType.ActionImageOffset; this.OpenImage = "current"; //第一个参数 one = new IntegerNumber(int.MinValue, int.MaxValue); one.key = "Vertical"; one.name = PdnResources.GetString("Menu.vertical.text"); one.initialValue = 0; one.value = 0; lists.Add(one); //第二个参数 two = new IntegerNumber(int.MinValue, int.MaxValue); two.key = "Horizal"; two.name = PdnResources.GetString("Menu.Level.text"); two.initialValue = 0; two.value = 0; lists.Add(two); //第三个参数 fillColor = new ColorNumber(); fillColor.key = "FillColor"; fillColor.name = PdnResources.GetString("Menu.Phasecolor.text"); fillColor.Value = Color.Black.ToArgb(); fillColor.initialValue = Color.Black.ToArgb(); lists.Add(fillColor); } } }