Example #1
0
 public void CreatePolyline(DxfEntity entity, Polyline4D polyline)
 {
     WpfWireframeGraphics3DUsingDrawingVisual.Class380.Class381 class381 = this.stack_0.Peek();
     if (polyline.Count <= 0)
     {
         return;
     }
     if (polyline.Count == 1)
     {
         this.CreateDot(entity, polyline[0]);
     }
     else
     {
         System.Windows.Point windowsPoint1 = this.matrix4D_0.TransformToWindowsPoint(polyline[0]);
         class381.method_1(windowsPoint1, class381.Fill, polyline.Closed);
         for (int index = 1; index < polyline.Count; ++index)
         {
             System.Windows.Point windowsPoint2 = this.matrix4D_0.TransformToWindowsPoint(polyline[index]);
             class381.method_4(windowsPoint2);
         }
     }
 }
Example #2
0
            public void CreateShape(DxfEntity entity, IShape4D shape)
            {
                if (shape.IsEmpty)
                {
                    return;
                }
                WW.Math.Point2D[] points = new WW.Math.Point2D[3];
                WpfWireframeGraphics3DUsingDrawingVisual.Class380.Class381 class381 = this.stack_0.Peek();
                List <bool>        boolList  = new List <bool>();
                ISegment2DIterator iterator1 = shape.CreateIterator(this.matrix4D_0);

                while (iterator1.MoveNext())
                {
                    switch (iterator1.CurrentType)
                    {
                    case SegmentType.MoveTo:
                        boolList.Add(false);
                        continue;

                    case SegmentType.Close:
                        boolList[boolList.Count - 1] = true;
                        continue;

                    default:
                        continue;
                    }
                }
                int num = 0;
                List <System.Windows.Point> pointList = new List <System.Windows.Point>();
                ISegment2DIterator          iterator2 = shape.CreateIterator(this.matrix4D_0);

                while (iterator2.MoveNext())
                {
                    switch (iterator2.Current(points, 0))
                    {
                    case SegmentType.MoveTo:
                        class381.method_1((System.Windows.Point)points[0], class381.Fill, boolList[num++]);
                        continue;

                    case SegmentType.LineTo:
                        class381.method_4((System.Windows.Point)points[0]);
                        continue;

                    case SegmentType.QuadTo:
                        pointList.Clear();
                        pointList.Add((System.Windows.Point)points[0]);
                        pointList.Add((System.Windows.Point)points[1]);
                        class381.method_6((IList <System.Windows.Point>)pointList);
                        continue;

                    case SegmentType.CubicTo:
                        pointList.Clear();
                        pointList.Add((System.Windows.Point)points[0]);
                        pointList.Add((System.Windows.Point)points[1]);
                        pointList.Add((System.Windows.Point)points[2]);
                        class381.method_8((IList <System.Windows.Point>)pointList);
                        continue;

                    default:
                        continue;
                    }
                }
            }