public void OnMouseMove(MouseEventArgs e) { if (this.currentGraph != null) { if (e.Button == MouseButtons.None) { this.preInfo = null; this.addInfo = null; this.moveinfo = null; Pen pen1 = new Pen(Color.Black, 4f); pen1.Alignment = PenAlignment.Center; if (Control.ModifierKeys == (Keys.Control | Keys.Shift)) { this.CurrentOperate = BezierOperate.CenterPoint; this.incenter = false; RectangleF ef1 = new RectangleF(this.mouseAreaControl.CenterPoint.X - 4f, this.mouseAreaControl.CenterPoint.Y - 4f, 8f, 8f); PointF tf1 = new PointF((float) e.X, (float) e.Y); if (ef1.Contains(tf1)) { this.incenter = true; } return; } PointF tf2 = new PointF((float) e.X, (float) e.Y); GraphicsPath path1 = new GraphicsPath(); PointInfoCollection.PointInfoEnumerator enumerator1 = this.currentGraph.PointsInfo.GetEnumerator(); while (enumerator1.MoveNext()) { PointInfo info1 = enumerator1.Current; GraphicsPath path2 = new GraphicsPath(); path2.AddRectangle(new RectangleF(info1.MiddlePoint.X - 3f, info1.MiddlePoint.Y - 3f, 6f, 6f)); path2.Transform(this.revertMatrix); if (path2.IsVisible(tf2) || path2.IsOutlineVisible(tf2, pen1)) { this.preInfo = info1; PointInfoCollection collection1 = new PointInfoCollection(); if (this.SubpathList.ContainsKey(info1.SubPath)) { collection1 = (PointInfoCollection) this.SubpathList[info1.SubPath]; } if ((((Control.ModifierKeys & Keys.Control) == Keys.Control) && ((Control.ModifierKeys & Keys.Alt) != Keys.Alt)) || (this.mouseAreaControl.CurrentOperation == ToolOperation.ShapeTransform) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom14) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom15)) { this.CurrentOperate = BezierOperate.MoveAnchor; return; } if ((info1.IsStart && (info1.PreInfo == null)) && (info1.NextInfo != null)) { this.CurrentOperate = BezierOperate.CloseFigure; return; } if ((collection1.IndexOf(info1) == (collection1.Count - 1)) && !info1.IsEnd) { this.CurrentOperate = BezierOperate.ChangeEndAnchor; this.preInfo = info1; return; } if (((Control.ModifierKeys & Keys.Alt) == Keys.Alt) || (this.mouseAreaControl.CurrentOperation == ToolOperation.ConvertAnchor)) { this.CurrentOperate = BezierOperate.ConvertAnchor; return; } this.CurrentOperate = BezierOperate.DelAnchor; return; } if (info1.NextInfo != null) { path1.Reset(); if (info1.NextInfo.FirstControl.IsEmpty) { path1.AddLine(info1.MiddlePoint, info1.NextInfo.MiddlePoint); } else { path1.AddBezier(info1.MiddlePoint, info1.NextInfo.FirstControl, info1.NextInfo.SecondControl, info1.NextInfo.MiddlePoint); } path1.Transform(this.revertMatrix); if (path1.IsOutlineVisible(tf2, pen1)) { if (((Control.ModifierKeys & Keys.Control) == Keys.Control) || (this.mouseAreaControl.CurrentOperation == ToolOperation.ShapeTransform) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom11) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom12) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom13) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom14) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom15)) { this.CurrentOperate = BezierOperate.MovePath; return; } if (((Control.ModifierKeys & Keys.Alt) != Keys.Alt) && (this.mouseAreaControl.CurrentOperation != ToolOperation.ConvertAnchor)) { this.addInfo = info1; this.CurrentOperate = BezierOperate.AddAnchor; } return; } } } if ((this.currentInfo != null) && (((this.mouseAreaControl.CurrentOperation == ToolOperation.ShapeTransform) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom11) || ((Control.ModifierKeys & Keys.Control) == Keys.Control)) || ((Control.ModifierKeys & Keys.Alt) == Keys.Alt)) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom12) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom13) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom14) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom15)) { int num1 = this.currentGraph.PointsInfo.IndexOf(this.currentInfo); if (!this.currentInfo.FirstControl.IsEmpty) { GraphicsPath path3 = new GraphicsPath(); path3.AddRectangle(new RectangleF(this.currentInfo.FirstControl.X - 3f, this.currentInfo.FirstControl.Y - 2f, 4f, 4f)); path3.Transform(this.revertMatrix); if (path3.IsVisible(tf2) || path3.IsOutlineVisible(tf2, pen1)) { this.moveinfo = this.currentInfo.PreInfo; this.movePoint = this.currentInfo.FirstControl; this.CurrentOperate = BezierOperate.MoveControl; return; } } GraphicsPath path4 = new GraphicsPath(); GraphicsPath path5 = new GraphicsPath(); path4.AddRectangle(new RectangleF(this.currentInfo.SecondControl.X - 2f, this.currentInfo.SecondControl.Y - 2f, 4f, 4f)); path5.AddRectangle(new RectangleF(this.currentInfo.NextControl.X - 2f, this.currentInfo.NextControl.Y - 2f, 4f, 4f)); path4.Transform(this.revertMatrix); path5.Transform(this.revertMatrix); if ((!this.currentInfo.SecondControl.IsEmpty && (path4.IsVisible(tf2) || path4.IsOutlineVisible(tf2, pen1))) || (!this.currentInfo.NextControl.IsEmpty && (path5.IsVisible(tf2) || path5.IsOutlineVisible(tf2, pen1)))) { this.moveinfo = this.currentInfo; this.movePoint = (!this.currentInfo.SecondControl.IsEmpty && (path4.IsVisible(tf2) || path4.IsOutlineVisible(tf2, pen1))) ? this.currentInfo.SecondControl : this.currentInfo.NextControl; this.CurrentOperate = BezierOperate.MoveControl; return; } if (this.currentInfo.NextInfo != null) { path4.Reset(); path4.AddRectangle(new RectangleF(this.currentInfo.NextInfo.SecondControl.X - 2f, this.currentInfo.NextInfo.SecondControl.Y - 2f, 4f, 4f)); path4.Transform(this.revertMatrix); if (!this.currentInfo.NextInfo.SecondControl.IsEmpty && (path4.IsVisible(tf2) || path4.IsOutlineVisible(tf2, pen1))) { this.moveinfo = this.currentInfo.NextInfo; this.movePoint = this.currentInfo.NextInfo.SecondControl; this.CurrentOperate = BezierOperate.MoveControl; return; } } } if (((Control.ModifierKeys & Keys.Alt) == Keys.Alt) || (this.mouseAreaControl.CurrentOperation == ToolOperation.ConvertAnchor)) { this.CurrentOperate = BezierOperate.ConvertAnchor; } else { if (((Control.ModifierKeys & Keys.Control) == Keys.Control) || (this.mouseAreaControl.CurrentOperation == ToolOperation.ShapeTransform) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom11) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom12) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom13) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom14) || (this.mouseAreaControl.CurrentOperation == ToolOperation.Custom15)) { this.CurrentOperate = BezierOperate.MoveAnchor; return; } this.CurrentOperate = BezierOperate.Draw; } return; } if (e.Button == MouseButtons.Left) { this.mouseAreaControl.Cursor = SpecialCursors.DragCursor; SizeF ef2 = this.mouseAreaControl.PicturePanel.GridSize; PointF tf3 = this.mouseAreaControl.PicturePanel.PointToView(new PointF((float) e.X, (float) e.Y)); float single1 = ef2.Height; float single2 = ef2.Width; if (this.mouseAreaControl.PicturePanel.SnapToGrid) { int num2 = (int) ((tf3.X + (single2 / 2f)) / single2); int num3 = (int) ((tf3.Y + (single1 / 2f)) / single1); tf3 = new PointF((float) ((int) (num2 * single2)), (float) ((int) (num3 * single1))); } tf3 = this.mouseAreaControl.PicturePanel.PointToSystem(tf3); tf3 = this.PointToView(tf3); Matrix matrix1 = new Matrix(); matrix1.Translate(tf3.X - this.startPoint.X, tf3.Y - this.startPoint.Y); this.win32.hdc = this.win32.W32GetDC(this.mouseAreaControl.Handle); this.win32.W32SetROP2(6); this.win32.W32PolyDraw(this.reversePath); this.reversePath.Reset(); switch (this.currentOperate) { case BezierOperate.Draw: { PointF tf4 = this.PointToView(new PointF((float) e.X, (float) e.Y)); PointF tf5 = new PointF((2f * this.startPoint.X) - tf4.X, (2f * this.startPoint.Y) - tf4.Y); if (this.currentInfo != null) { this.reversePath.AddBezier(this.currentInfo.MiddlePoint, this.currentinfo.NextControl, tf5, this.startPoint); this.reversePath.Transform(this.revertMatrix); } PointF[] tfArray10 = new PointF[3] { this.startPoint, tf4, tf5 } ; PointF[] tfArray1 = tfArray10; this.revertMatrix.TransformPoints(tfArray1); RectangleF[] efArray1 = new RectangleF[3] { new RectangleF(tfArray1[1].X - 2f, tfArray1[1].Y - 2f, 4f, 4f), new RectangleF(tfArray1[2].X - 2f, tfArray1[2].Y - 2f, 4f, 4f), new RectangleF(tfArray1[0].X - 2f, tfArray1[0].Y - 2f, 4f, 4f) } ; this.reversePath.AddRectangles(efArray1); this.reversePath.AddLine(tfArray1[1], tfArray1[2]); this.win32.W32PolyDraw(this.reversePath); this.win32.ReleaseDC(); return; } case BezierOperate.AddAnchor: case BezierOperate.DelAnchor: case BezierOperate.ChangeAnchor: case BezierOperate.CloseFigure: { return; } case BezierOperate.MoveAnchor: { PointInfoCollection.PointInfoEnumerator enumerator2 = this.activePoints.GetEnumerator(); while (enumerator2.MoveNext()) { PointInfo info2 = enumerator2.Current; PointInfo info3 = info2.PreInfo; PointInfo info4 = info2.NextInfo; PointF tf6 = info2.MiddlePoint; PointF tf7 = info2.NextControl; tf7 = tf7.IsEmpty ? info2.MiddlePoint : tf7; PointF[] tfArray11 = new PointF[3] { (info2.SecondControl.IsEmpty && (info3 != null)) ? info3.MiddlePoint : info2.SecondControl, info2.MiddlePoint, tf7 } ; PointF[] tfArray2 = tfArray11; matrix1.TransformPoints(tfArray2); this.reversePath.StartFigure(); if (info3 != null) { PointF tf8 = info3.MiddlePoint; PointF tf9 = info2.FirstControl; if ((info2.IsStart && info3.IsEnd) && ((info3.MiddlePoint == info2.MiddlePoint) && (info3.PreInfo != null))) { tf8 = info3.PreInfo.MiddlePoint; tf9 = info3.FirstControl; } tf9 = tf9.IsEmpty ? tf8 : tf9; if (this.activePoints.Contains(info3)) { PointF[] tfArray12 = new PointF[2] { tf8, tf9 } ; PointF[] tfArray3 = tfArray12; matrix1.TransformPoints(tfArray3); tf8 = tfArray3[0]; tf9 = tfArray3[1]; } if (tf8 != tfArray2[1]) { if (info3.FirstControl.IsEmpty && info2.FirstControl.IsEmpty) { this.reversePath.AddLine(tf8, tfArray2[1]); } else { this.reversePath.AddBezier(tf8, tf9, tfArray2[0], tfArray2[1]); } } } this.reversePath.StartFigure(); if ((info4 != null) && !this.activePoints.Contains(info4)) { PointF tf10 = info4.SecondControl; tf10 = tf10.IsEmpty ? info4.MiddlePoint : tf10; if (info2.FirstControl.IsEmpty && info4.FirstControl.IsEmpty) { this.reversePath.AddLine(tfArray2[2], info4.MiddlePoint); } else { this.reversePath.AddBezier(tfArray2[1], tfArray2[2], tf10, info4.MiddlePoint); } } } this.reversePath.Transform(this.revertMatrix); if (this.currentInfo != null) { if (this.activePoints.Count == 1) { PointF[] tfArray13 = new PointF[3] { this.currentInfo.SecondControl, this.currentInfo.MiddlePoint, this.currentInfo.NextControl } ; PointF[] tfArray4 = tfArray13; matrix1.TransformPoints(tfArray4); this.revertMatrix.TransformPoints(tfArray4); RectangleF[] efArray2 = new RectangleF[1] { new RectangleF(tfArray4[1].X - 2f, tfArray4[1].Y - 2f, 4f, 4f) } ; this.reversePath.AddRectangles(efArray2); if (!this.currentInfo.SecondControl.IsEmpty) { this.reversePath.AddRectangle(new RectangleF(tfArray4[0].X - 2f, tfArray4[0].Y - 2f, 4f, 4f)); this.reversePath.AddLine(tfArray4[0], tfArray4[1]); } if (!this.currentInfo.NextControl.IsEmpty) { this.reversePath.AddRectangle(new RectangleF(tfArray4[2].X - 2f, tfArray4[2].Y - 2f, 4f, 4f)); this.reversePath.AddLine(tfArray4[1], tfArray4[2]); } } } else { int num4 = (int) Math.Min(this.startPoint.X, tf3.X); int num5 = (int) Math.Min(this.startPoint.Y, tf3.Y); int num6 = (int) Math.Max(this.startPoint.X, tf3.X); int num7 = (int) Math.Max(this.startPoint.Y, tf3.Y); this.reversePath.AddRectangle(new RectangleF((float) num4, (float) num5, (float) (num6 - num4), (float) (num7 - num5))); this.reversePath.Transform(this.revertMatrix); } this.win32.W32PolyDraw(this.reversePath); this.win32.ReleaseDC(); return; } case BezierOperate.ConvertAnchor: { if (this.currentInfo != null) { PointF[] tfArray18 = new PointF[2] { tf3, this.currentInfo.MiddlePoint } ; PointF[] tfArray6 = tfArray18; this.revertMatrix.TransformPoints(tfArray6); PointF tf13 = tfArray6[0]; PointF tf14 = tfArray6[1]; if (this.currentInfo.NextInfo != null) { this.reversePath.AddBezier(this.currentInfo.MiddlePoint, tf3, this.currentInfo.NextInfo.SecondControl.IsEmpty ? this.currentInfo.NextInfo.MiddlePoint : this.currentInfo.NextInfo.SecondControl, this.currentInfo.NextInfo.MiddlePoint); } if (this.currentInfo.PreInfo != null) { this.reversePath.StartFigure(); tf3 = new PointF((2f * this.currentInfo.MiddlePoint.X) - tf3.X, (2f * this.currentInfo.MiddlePoint.Y) - tf3.Y); PointInfo info5 = this.currentinfo.PreInfo; PointInfo info6 = this.currentinfo; if ((this.currentinfo.IsStart && info5.IsEnd) && (info5.MiddlePoint == this.currentinfo.MiddlePoint)) { info6 = info5; info5 = info5.PreInfo; } if (info5 != null) { PointF tf15 = info6.FirstControl.IsEmpty ? info5.MiddlePoint : info6.FirstControl; this.reversePath.AddBezier(info5.MiddlePoint, tf15, tf3, info6.MiddlePoint); } } this.reversePath.Transform(this.revertMatrix); this.reversePath.StartFigure(); RectangleF[] efArray5 = new RectangleF[1] { new RectangleF(tf14.X - 2f, tf14.Y - 2f, 4f, 4f) } ; this.reversePath.AddRectangles(efArray5); if (((Math.Abs((float) (tf13.X - tf3.X)) >= 1f) || (Math.Abs((float) (tf13.Y - tf3.Y)) >= 1f)) && (this.currentInfo.NextInfo != null)) { PointF tf16 = new PointF((2f * tf14.X) - tf13.X, (2f * tf14.Y) - tf13.Y); RectangleF[] efArray6 = new RectangleF[2] { new RectangleF(tf13.X - 2f, tf13.Y - 2f, 4f, 4f), new RectangleF(tf16.X - 2f, tf16.Y - 2f, 4f, 4f) } ; this.reversePath.AddRectangles(efArray6); this.reversePath.AddLine(tf16, tf14); } this.reversePath.AddLine(tf14, tf13); } this.win32.W32PolyDraw(this.reversePath); this.win32.ReleaseDC(); return; } case BezierOperate.ChangeEndAnchor: { if (this.preInfo == null) { return; } PointF tf17 = new PointF((2f * this.preInfo.MiddlePoint.X) - tf3.X, (2f * this.preInfo.MiddlePoint.Y) - tf3.Y); if ((((Control.ModifierKeys & Keys.Alt) != Keys.Alt) && !this.preInfo.FirstControl.IsEmpty) && (this.preInfo.MiddlePoint != this.preInfo.SecondControl)) { this.reversePath.AddBezier(this.preInfo.PreInfo.MiddlePoint, this.preInfo.FirstControl, tf3, this.preInfo.MiddlePoint); this.reversePath.Transform(this.revertMatrix); PointF[] tfArray21 = new PointF[3] { tf3, this.preInfo.MiddlePoint, tf17 } ; PointF[] tfArray9 = tfArray21; this.revertMatrix.TransformPoints(tfArray9); RectangleF[] efArray7 = new RectangleF[3] { new RectangleF(tfArray9[0].X - 2f, tfArray9[0].Y - 2f, 4f, 4f), new RectangleF(tfArray9[1].X - 2f, tfArray9[1].Y - 2f, 4f, 4f), new RectangleF(tfArray9[2].X - 2f, tfArray9[2].Y - 2f, 4f, 4f) } ; this.reversePath.AddRectangles(efArray7); this.reversePath.AddLine(tfArray9[0], tfArray9[2]); goto Label_2164; } PointF[] tfArray20 = new PointF[2] { this.preInfo.MiddlePoint, tf3 } ; PointF[] tfArray8 = tfArray20; this.revertMatrix.TransformPoints(tfArray8); this.reversePath.AddLine(tfArray8[0], tfArray8[1]); goto Label_2164; } case BezierOperate.MoveControl: { if (this.moveinfo != null) { PointF[] tfArray14 = new PointF[2] { this.moveinfo.MiddlePoint, tf3 } ; PointF[] tfArray5 = tfArray14; this.revertMatrix.TransformPoints(tfArray5); PointF tf11 = tfArray5[0]; PointF tf12 = tfArray5[1]; if (this.movePoint == this.moveinfo.SecondControl) { if (this.moveinfo.PreInfo != null) { if (this.moveinfo.IsStart && this.moveinfo.PreInfo.IsEnd) { if (this.moveinfo.PreInfo.PreInfo != null) { this.reversePath.AddBezier(this.moveinfo.PreInfo.PreInfo.MiddlePoint, this.moveinfo.PreInfo.FirstControl, tf3, this.moveinfo.PreInfo.MiddlePoint); } } else { if (this.moveinfo.Command=="A") { float ry=matrix1.OffsetY+this.moveinfo.Ry; ry=ry>5?ry:this.moveinfo.Ry; ExtendedGraphicsPath expath1 = new ExtendedGraphicsPath(this.reversePath); expath1.AddArc(this.moveinfo.PreInfo.MiddlePoint,this.moveinfo.MiddlePoint,this.moveinfo.Rx,ry,this.moveinfo.LargeArcFlage==1,this.moveinfo.SweepFlage==1,this.moveinfo.Angle); } else { this.reversePath.AddBezier(this.moveinfo.PreInfo.MiddlePoint, this.moveinfo.FirstControl, tf3, this.moveinfo.MiddlePoint); } } } float single3 = tf12.X; float single4 = tf12.Y; bool flag1 = false; if (((this.moveinfo.NextInfo != null) && ((Control.ModifierKeys & Keys.Alt) != Keys.Alt)) && !this.moveinfo.Steep) { if (!this.moveinfo.NextInfo.FirstControl.IsEmpty) { float single5 = (float) Math.Sqrt(Math.Pow((double) (this.moveinfo.SecondControl.X - this.moveinfo.MiddlePoint.X), 2) + Math.Pow((double) (this.moveinfo.SecondControl.Y - this.moveinfo.MiddlePoint.Y), 2)); float single6 = (float) Math.Sqrt(Math.Pow((double) (tf3.X - this.moveinfo.MiddlePoint.X), 2) + Math.Pow((double) (tf3.Y - this.moveinfo.MiddlePoint.Y), 2)); if (single5 == 0f) { single5 += 0.0001f; } float single7 = single6 / single5; single3 = this.moveinfo.MiddlePoint.X + (single7 * (this.moveinfo.MiddlePoint.X - tf3.X)); single4 = this.moveinfo.MiddlePoint.Y + (single7 * (this.moveinfo.MiddlePoint.Y - tf3.Y)); this.reversePath.AddBezier(this.moveinfo.MiddlePoint, new PointF(single3, single4), this.moveinfo.NextInfo.SecondControl, this.moveinfo.NextInfo.MiddlePoint); PointF[] tfArray15 = new PointF[1] { new PointF(single3, single4) } ; tfArray5 = tfArray15; this.revertMatrix.TransformPoints(tfArray5); single3 = tfArray5[0].X; single4 = tfArray5[0].Y; } flag1 = this.activePoints.Contains(this.moveinfo.NextInfo); } this.reversePath.Transform(this.revertMatrix); this.reversePath.StartFigure(); RectangleF[] efArray3 = new RectangleF[2] { new RectangleF(tf11.X - 2f, tf11.Y - 2f, 4f, 4f), new RectangleF(tf12.X - 2f, tf12.Y - 2f, 4f, 4f) } ; this.reversePath.AddRectangles(efArray3); if ((Math.Abs((float) (single3 - tf12.X)) >= 1f) || (Math.Abs((float) (single4 - tf12.Y)) >= 1f)) { this.reversePath.AddRectangle(new RectangleF(single3 - 2f, single4 - 2f, 4f, 4f)); this.reversePath.AddLine(new PointF(single3, single4), tf11); } this.reversePath.AddLine(tf11, tf12); } else if (this.movePoint == this.moveinfo.NextControl) { if (this.moveinfo.Command=="A") { float rx=matrix1.OffsetX+this.moveinfo.Rx; rx=rx>5?rx:this.moveinfo.Rx; ExtendedGraphicsPath expath1 = new ExtendedGraphicsPath(this.reversePath); expath1.AddArc(this.moveinfo.PreInfo.MiddlePoint,this.moveinfo.MiddlePoint,rx,this.moveinfo.Ry,this.moveinfo.LargeArcFlage==1,this.moveinfo.SweepFlage==1,this.moveinfo.Angle); } else { if (this.moveinfo.NextInfo != null) { this.reversePath.AddBezier(this.moveinfo.MiddlePoint, tf3, this.moveinfo.NextInfo.SecondControl, this.moveinfo.NextInfo.MiddlePoint); } } float single8 = tf12.X; float single9 = tf12.Y; bool flag2 = true; if (((this.moveinfo.PreInfo != null) && ((Control.ModifierKeys & Keys.Alt) != Keys.Alt)) && !this.moveinfo.Steep) { if ((this.moveinfo.IsStart && this.moveinfo.PreInfo.IsEnd) && (this.moveinfo.PreInfo.PreInfo != null)) { float single10 = (float) Math.Sqrt(Math.Pow((double) (this.moveinfo.NextControl.X - this.moveinfo.MiddlePoint.X), 2) + Math.Pow((double) (this.moveinfo.NextControl.Y - this.moveinfo.MiddlePoint.Y), 2)); float single11 = (float) Math.Sqrt(Math.Pow((double) (tf3.X - this.moveinfo.MiddlePoint.X), 2) + Math.Pow((double) (tf3.Y - this.moveinfo.MiddlePoint.Y), 2)); if (single10 == 0f) { single10 += 0.0001f; } float single12 = single11 / single10; single8 = this.moveinfo.MiddlePoint.X + (single12 * (this.moveinfo.MiddlePoint.X - tf3.X)); single9 = this.moveinfo.MiddlePoint.Y + (single12 * (this.moveinfo.MiddlePoint.Y - tf3.Y)); this.reversePath.StartFigure(); this.reversePath.AddBezier(this.moveinfo.PreInfo.PreInfo.MiddlePoint, this.moveinfo.PreInfo.FirstControl, new PointF(single8, single9), this.moveinfo.MiddlePoint); PointF[] tfArray16 = new PointF[1] { new PointF(single8, single9) } ; tfArray5 = tfArray16; this.revertMatrix.TransformPoints(tfArray5); single8 = tfArray5[0].X; single9 = tfArray5[0].Y; } else if (!this.moveinfo.SecondControl.IsEmpty) { float single13 = (float) Math.Sqrt(Math.Pow((double) (this.moveinfo.NextControl.X - this.moveinfo.MiddlePoint.X), 2) + Math.Pow((double) (this.moveinfo.NextControl.Y - this.moveinfo.MiddlePoint.Y), 2)); float single14 = (float) Math.Sqrt(Math.Pow((double) (tf3.X - this.moveinfo.MiddlePoint.X), 2) + Math.Pow((double) (tf3.Y - this.moveinfo.MiddlePoint.Y), 2)); if (single13 == 0f) { single13 += 0.0001f; } float single15 = single14 / single13; single8 = this.moveinfo.MiddlePoint.X + (single15 * (this.moveinfo.MiddlePoint.X - tf3.X)); single9 = this.moveinfo.MiddlePoint.Y + (single15 * (this.moveinfo.MiddlePoint.Y - tf3.Y)); this.reversePath.StartFigure(); this.reversePath.AddBezier(this.moveinfo.PreInfo.MiddlePoint, this.moveinfo.FirstControl, new PointF(single8, single9), this.moveinfo.MiddlePoint); PointF[] tfArray17 = new PointF[1] { new PointF(single8, single9) } ; tfArray5 = tfArray17; this.revertMatrix.TransformPoints(tfArray5); single8 = tfArray5[0].X; single9 = tfArray5[0].Y; } flag2 = this.activePoints.Contains(this.moveinfo.PreInfo); } this.reversePath.Transform(this.revertMatrix); this.reversePath.StartFigure(); RectangleF[] efArray4 = new RectangleF[2] { new RectangleF(tf11.X - 2f, tf11.Y - 2f, 4f, 4f), new RectangleF(tf12.X - 2f, tf12.Y - 2f, 4f, 4f) } ; this.reversePath.AddRectangles(efArray4); if ((Math.Abs((float) (single8 - tf12.X)) >= 1f) || (Math.Abs((float) (single9 - tf12.Y)) >= 1f)) { this.reversePath.AddRectangle(new RectangleF(single8 - 2f, single9 - 2f, 4f, 4f)); this.reversePath.AddLine(new PointF(single8, single9), tf11); } this.reversePath.AddLine(tf11, tf12); } this.win32.W32PolyDraw(this.reversePath); this.win32.ReleaseDC(); } return; } case BezierOperate.MovePath: { this.reversePath = (GraphicsPath) this.currentGraph.GPath.Clone(); this.reversePath.Transform(matrix1); this.reversePath.Transform(this.revertMatrix); this.win32.W32PolyDraw(this.reversePath); this.win32.ReleaseDC(); return; } case BezierOperate.CenterPoint: { PointF[] tfArray19 = new PointF[1] { tf3 } ; PointF[] tfArray7 = tfArray19; this.revertMatrix.TransformPoints(tfArray7); this.reversePath.AddEllipse((float) (tfArray7[0].X - 4f), (float) (tfArray7[0].Y - 4f), (float) 8f, (float) 8f); this.win32.W32PolyDraw(this.reversePath); this.win32.ReleaseDC(); return; } } } } return; Label_2164: this.win32.W32PolyDraw(this.reversePath); this.win32.ReleaseDC(); }