public void CreateShape( DxfEntity entity, DrawContext.Wireframe drawContext, ArgbColor color, bool forText, IShape4D shape) { WW.Math.Point2D[] points = new WW.Math.Point2D[3]; if (shape.IsEmpty) { return; } this.textWriter_0.WriteLine("newpath"); WW.Math.Point2D point2D = new WW.Math.Point2D(); WW.Math.Point2D p0 = new WW.Math.Point2D(); ISegment2DIterator iterator = shape.ToShape2D(Matrix4D.Identity).CreateIterator(); while (iterator.MoveNext()) { switch (iterator.Current(points, 0)) { case SegmentType.MoveTo: WW.Math.Point2D p; p0 = p = points[0]; point2D = p; this.method_8(p); continue; case SegmentType.LineTo: this.method_9(p0 = points[0]); continue; case SegmentType.QuadTo: Pair <WW.Math.Point2D, WW.Math.Point2D> cubicBezier = ShapeTool.QuadToCubicBezier(p0, points[0], points[1]); this.method_10(cubicBezier.First, cubicBezier.Second, p0 = points[1]); continue; case SegmentType.CubicTo: this.method_10(points[0], points[1], p0 = points[2]); continue; case SegmentType.Close: this.textWriter_0.WriteLine("closepath"); p0 = point2D; continue; default: continue; } } if (shape.IsFilled) { this.textWriter_0.WriteLine("fill"); } this.textWriter_0.WriteLine("stroke"); }
public void CreateShape( DxfEntity entity, DrawContext.Wireframe drawContext, ArgbColor color, bool forText, IShape4D shape) { using (GraphicsPath graphicsPath = ShapeTool.ToGraphicsPath(shape.ToShape2D(Matrix4D.Identity))) this.graphicsPath_0.AddPath(graphicsPath, false); }