コード例 #1
0
 public void CreateXLine(DxfEntity entity, Vector4D?startPoint, Segment4D segment)
 {
     WpfWireframeGraphics3DUsingDrawingVisual.Class380.Class381 class381 = this.stack_0.Peek();
     System.Windows.Point windowsPoint1 = this.matrix4D_0.TransformToWindowsPoint(segment.Start);
     System.Windows.Point windowsPoint2 = this.matrix4D_0.TransformToWindowsPoint(segment.End);
     class381.method_1(windowsPoint1, false, false);
     class381.method_3(windowsPoint2, false);
 }
コード例 #2
0
            public void CreateDot(DxfEntity entity, Vector4D position)
            {
                WpfWireframeGraphics3DUsingDrawingVisual.Class380.Class381 class381 = this.stack_0.Peek();
                double num = 0.5 * class381.PenThickness;

                WW.Math.Point2D      point2D = this.matrix4D_0.TransformToPoint2D(position);
                System.Windows.Point point1  = new System.Windows.Point(point2D.X - num, point2D.Y);
                System.Windows.Point point2  = new System.Windows.Point(point2D.X + num, point2D.Y);
                Size size = new Size(num, num);

                class381.method_1(point1, true, true);
                class381.method_2(point2, size, 180.0);
                class381.method_2(point1, size, 180.0);
            }
コード例 #3
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);
         }
     }
 }
コード例 #4
0
            public void BeginGeometry(
                DxfEntity entity,
                DrawContext.Wireframe drawContext,
                ArgbColor color,
                bool forText,
                bool fill,
                bool stroke,
                bool correctForBackgroundColor)
            {
                WpfWireframeGraphics3DUsingDrawingVisual.Class380.Class381 class381 = new WpfWireframeGraphics3DUsingDrawingVisual.Class380.Class381(entity);
                class381.Visual.Tag = this.objectTaggerDelegate_0(entity, (DrawContext)drawContext);
                class381.Fill       = fill;
                Interface11 nterface11 = correctForBackgroundColor ? this.interface11_0 : this.interface11_1;

                class381.Brush        = nterface11.imethod_0(color);
                class381.PenThickness = this.method_0(entity, (DrawContext)drawContext, forText);
                if (stroke)
                {
                    class381.Pen = nterface11.imethod_1(color, class381.PenThickness);
                }
                this.stack_0.Push(class381);
                this.visualCollection_0.Add((Visual)class381.Visual);
            }
コード例 #5
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;
                    }
                }
            }