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); }
public override System.Xml.XmlElement ToXML(System.Xml.XmlDocument xmldoc) { if (_expArg == null) { _expArg = new NSMCExpEnhanceArg(); } return(_expArg.ToXML(xmldoc)); }
public override RgbProcessorArg Clone() { NSMCExpEnhanceArg arg = new NSMCExpEnhanceArg(); arg.RedControlPoint = _rPoint; arg.GreenControlPoint = _gPoint; arg.BlueControlPoint = _bPoint; return(arg); }
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(); }
protected override void BeforeProcess() { base.BeforeProcess(); _expArg = _arg as NSMCExpEnhanceArg; }
public override void CreateDefaultArguments() { _arg = new NSMCExpEnhanceArg(); }