Esempio n. 1
0
 public static void UpdateAllPoints(PathGeometry geometry, Transform transform)
 {
     for (int index1 = 0; index1 < geometry.Figures.Count; ++index1)
     {
         PathFigure       figure           = geometry.Figures[index1];
         PathFigureEditor pathFigureEditor = new PathFigureEditor(figure);
         int index2 = 1;
         if (!PathFigureUtilities.IsClosed(figure) || !PathFigureUtilities.IsCloseSegmentDegenerate(figure))
         {
             pathFigureEditor.SetPoint(0, transform.Transform(figure.StartPoint));
         }
         for (int index3 = 0; index3 < figure.Segments.Count; ++index3)
         {
             System.Windows.Media.PathSegment segment = figure.Segments[index3];
             int pointCount = PathSegmentUtilities.GetPointCount(segment);
             for (int index4 = 0; index4 < pointCount; ++index4)
             {
                 Point point = PathSegmentUtilities.GetPoint(segment, index4);
                 pathFigureEditor.SetPoint(index2, transform.Transform(point));
                 ++index2;
             }
         }
     }
 }