public void MoveNodeTo(AxMap pMap, CFOUNDNODE ENode, PointF pt) { float num = (float)(this.m_Zoom / pMap.Zoom); num = Conversions.ToSingle(Operators.MultiplyObject(num, Interaction.IIf(this.m_MWidth > 0f, pMap.MapScreenWidth / this.m_MWidth, 1))); float num2; float num3; pMap.ConvertCoord(ref num2, ref num3, ref this.m_GocX, ref this.m_GocY, ConversionConstants.miMapToScreen); Matrix matrix = new Matrix(); GraphicObject foundObject = ENode.FoundObject; matrix.Translate(-num2, -num3, MatrixOrder.Append); matrix.Scale(1f / num, 1f / num, MatrixOrder.Append); PointF[] array = new PointF[] { pt }; matrix.TransformPoints(array); PointF pt2 = new PointF(array[0].X, array[0].Y); foundObject.MoveNodeTo(ENode.NodeIndex, pt2); }
public void ChangeZoomMWidtht(double newZoom, float newMWidth) { checked { try { IEnumerator enumerator = this.m_GObjs.GetEnumerator(); while (enumerator.MoveNext()) { GraphicObject graphicObject = (GraphicObject)enumerator.Current; PointF[] points = graphicObject.GetPoints(); float num = (float)(this.m_Zoom / newZoom); num = Conversions.ToSingle(Operators.MultiplyObject(num, Interaction.IIf(this.m_MWidth > 0f, newMWidth / this.m_MWidth, 1))); Matrix matrix = new Matrix(); matrix.Reset(); matrix.Scale(num, num, MatrixOrder.Append); matrix.TransformPoints(points); int arg_8C_0 = 0; int upperBound = points.GetUpperBound(0); for (int i = arg_8C_0; i <= upperBound; i++) { graphicObject.MoveNodeTo(i, points[i]); } } } finally { IEnumerator enumerator; if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } this.m_Zoom = newZoom; this.m_MWidth = newMWidth; } }