コード例 #1
0
        public static RgbProcessor FromXML(XmlElement ele)
        {
            NSMCExpEnhanceArg arg = new NSMCExpEnhanceArg();

            for (int i = 0; i < ele.ChildNodes.Count; i++)
            {
                XmlNode node = ele.ChildNodes[i];
                switch (node.Name)
                {
                case "Red":
                    arg.RedControlPoint = GetPoint(node.InnerText);
                    break;

                case "Green":
                    arg.GreenControlPoint = GetPoint(node.InnerText);
                    break;

                case "Blue":
                    arg.BlueControlPoint = GetPoint(node.InnerText);
                    break;

                default:
                    break;
                }
            }
            NSMCExpEnhanceProcessor pro = new NSMCExpEnhanceProcessor(arg);

            return(pro);
        }
コード例 #2
0
 public override System.Xml.XmlElement ToXML(System.Xml.XmlDocument xmldoc)
 {
     if (_expArg == null)
     {
         _expArg = new NSMCExpEnhanceArg();
     }
     return(_expArg.ToXML(xmldoc));
 }
コード例 #3
0
        public override RgbProcessorArg Clone()
        {
            NSMCExpEnhanceArg arg = new NSMCExpEnhanceArg();

            arg.RedControlPoint   = _rPoint;
            arg.GreenControlPoint = _gPoint;
            arg.BlueControlPoint  = _bPoint;
            return(arg);
        }
コード例 #4
0
        protected override void CollectArguments()
        {
            if (_arg == null)
            {
                return;
            }
            NSMCExpEnhanceArg actualArg = _arg as NSMCExpEnhanceArg;

            if (_curveControl.Channels == 3)
            {
                for (int i = 0; i < _curveControl.Channels; i++)
                {
                    PointsControl curve = _curveControl;
                    if (i == 0)
                    {
                        actualArg.RedControlPoint = curve.ControlPoints[i];
                    }
                    else if (i == 1)
                    {
                        actualArg.GreenControlPoint = curve.ControlPoints[i];
                    }
                    else if (i == 2)
                    {
                        actualArg.BlueControlPoint = curve.ControlPoints[i];
                    }
                }
            }
            else
            {
                PointsControl curve = _curveControl;
                actualArg.RedControlPoint   = curve.ControlPoints[0];
                actualArg.GreenControlPoint = curve.ControlPoints[0];
                actualArg.BlueControlPoint  = curve.ControlPoints[0];
            }

            base.CollectArguments();
        }
コード例 #5
0
 protected override void BeforeProcess()
 {
     base.BeforeProcess();
     _expArg = _arg as NSMCExpEnhanceArg;
 }
コード例 #6
0
 public override void CreateDefaultArguments()
 {
     _arg = new NSMCExpEnhanceArg();
 }