public ProjectorData GetProjectorData() { return(new ProjectorData { BlendData = new BlendSettings { MaxBlend = MaxBlend, BlacklevelOffset = BlacklevelOffset, Blacklevel2Offset = Blacklevel2Offset, CurvePoints = BlendCurve.GetCurvePoints() }, ControlPoints = ControlPoints.ToArray(), BlendRegionControlPoints = BlendRegionControlPoints.ToArray(), BlacklevelControlPoints = BlacklevelControlPoints.ToArray(), Blacklevel2ControlPoints = Blacklevel2ControlPoints.ToArray() }); }
private void InitBlacklevel2() { Blacklevel2ControlPoints.Clear(); Enumerable.Range(0, 10).ToList().ForEach(p => Blacklevel2ControlPoints.Add(new ControlPoint())); Blacklevel2ControlPoints[0].X = _resolution.Width - _overlap - _overlap / 4; for (var i = 6; i <= 9; i++) { Blacklevel2ControlPoints[i].X = Blacklevel2ControlPoints[0].X; } for (var i = 1; i <= 5; i++) { Blacklevel2ControlPoints[i].X = _resolution.Width; } var dy = _resolution.Height / 4; for (var i = 2; i <= 5; i++) { Blacklevel2ControlPoints[i].Y = (i - 1) * dy; Blacklevel2ControlPoints[11 - i].Y = Blacklevel2ControlPoints[i].Y; } Blacklevel2ControlPoints[0].ControlPointType = ControlPointType.IsEcke; Blacklevel2ControlPoints[1].ControlPointType = ControlPointType.IsEcke; Blacklevel2ControlPoints[5].ControlPointType = ControlPointType.IsEcke; Blacklevel2ControlPoints[6].ControlPointType = ControlPointType.IsEcke; foreach (var cp in Blacklevel2ControlPoints) { cp.U = cp.X; cp.V = cp.Y; cp.AllowAllDirections(); } if (_index == 1) { foreach (var cp in Blacklevel2ControlPoints) { cp.X = cp.U = Resolution.Width - cp.X; } } Blacklevel2Indexes = Enumerable.Range(0, Blacklevel2ControlPoints.Count).ToArray(); }