using PaintDotNet.Base;
using PaintDotNet.Data.Param;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PaintDotNet.Data.Action
{
///
///
///
public class Action6001 : ParamObject
{
public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
{
//bool isPixel = false;
//for (int i = 0; i < this.lists.Count; i++)
//{
// Args args = lists[i];
// switch (args.Key)
// {
// case "unit":
// isPixel = args.value.ToString().Equals(PdnResources.GetString("Menu.Pixel.text"));
// break;
// }
//}
//if (isPixel)
//{
//}
return Adjust.AdjustIntent.ResizeMat(src,this.lists);
}
///
/// 用于初始化参数
///
public Action6001()
{
this.MenuId = ActionType.ImageChangeResolution;
this.OpenImage = "current";
//宽
IntegerNumber stringArray2 = new IntegerNumber(0, 100000);
stringArray2.key = "width";
stringArray2.name = "宽度";
stringArray2.initialValue = 0;
stringArray2.Value = 0;
lists.Add(stringArray2);
//长
IntegerNumber stringArray = new IntegerNumber(0,100000);
stringArray.key = "height";
stringArray.name = "高度";
stringArray.initialValue = 0;
stringArray.Value = 0;
lists.Add(stringArray);
BooleanObject autoThreshold = new BooleanObject();
autoThreshold.key = "lockAspectRatio";
autoThreshold.name = "锁定横纵比";
autoThreshold.initialValue = false;
autoThreshold.value = false;
lists.Add(autoThreshold);
////单位
StringArray binaryTypeA = new StringArray();
binaryTypeA.key = "unit";
binaryTypeA.name = "单位";
binaryTypeA.initialValue = InvariantData.unitparameters;
binaryTypeA.Value = MeasurementUnit.Pixel;
lists.Add(binaryTypeA);
}
}
}