public override void DrawInternal( DrawContext.Surface context, Graphics graphics, IGraphicElementBlock parentGraphicElementBlock) { ArgbColor plotColor = context.GetPlotColor((DxfEntity)this); DxfLineType lineType = this.GetLineType((DrawContext)context); bool plinegen = (this.Flags & Enum21.flag_8) != Enum21.flag_0; double lineTypeScale = context.TotalLineTypeScale * this.LineTypeScale; if (!graphics.AddExistingGraphicElement2(parentGraphicElementBlock, (DxfEntity)this, plotColor, lineType, lineTypeScale, plinegen)) { return; } GraphicElement2 graphicElement2 = new GraphicElement2(plotColor, lineType, lineTypeScale, plinegen); graphics.AddNewGraphicElement((DxfEntity)this, parentGraphicElementBlock, (GraphicElement1)graphicElement2); bool approximationPointsDrawn; WW.Math.Geometry.Polyline3D polyline = this.method_14(context.Config, out approximationPointsDrawn); graphicElement2.Geometry.Add(WW.Cad.Drawing.Surface.Polyline3D.CreatePrimitive(polyline)); if (context.Config.ShowSplineControlPoints) { graphicElement2.Geometry.Add(WW.Cad.Drawing.Surface.Polyline3D.CreatePrimitive(this.method_16())); } if (!context.Config.ShowSplineApproximationPoints || approximationPointsDrawn) { return; } graphicElement2.Geometry.Add(WW.Cad.Drawing.Surface.Polyline3D.CreatePrimitive(this.method_17())); }
public override void DrawInternal( DrawContext.Surface context, Graphics graphics, IGraphicElementBlock parentGraphicElementBlock) { ArgbColor plotColor = context.GetPlotColor((DxfEntity)this); DxfLineType lineType = this.GetLineType((DrawContext)context); double lineTypeScale = context.TotalLineTypeScale * this.LineTypeScale; if (!graphics.AddExistingGraphicElement2(parentGraphicElementBlock, (DxfEntity)this, plotColor, lineType, lineTypeScale, false)) { return; } GraphicElement2 graphicElement2 = new GraphicElement2(plotColor, lineType, lineTypeScale, true); graphics.AddNewGraphicElement((DxfEntity)this, parentGraphicElementBlock, (GraphicElement1)graphicElement2); WW.Math.Geometry.Polyline3D polyline = this.method_14(context.Config); graphicElement2.Geometry.Add(WW.Cad.Drawing.Surface.Polyline3D.CreatePrimitive(polyline)); }
public override void DrawInternal( DrawContext.Surface context, Graphics graphics, IGraphicElementBlock parentGraphicElementBlock) { ArgbColor plotColor = context.GetPlotColor((DxfEntity)this); DxfLineType lineType = this.GetLineType((DrawContext)context); bool plinegen = (this.Flags & Enum21.flag_8) != Enum21.flag_0; double lineTypeScale = context.TotalLineTypeScale * this.LineTypeScale; if (!graphics.AddExistingGraphicElement2(parentGraphicElementBlock, (DxfEntity)this, plotColor, lineType, lineTypeScale, plinegen)) { return; } GraphicElement2 graphicElement2 = new GraphicElement2(plotColor, lineType, lineTypeScale, plinegen); graphics.AddNewGraphicElement((DxfEntity)this, parentGraphicElementBlock, (GraphicElement1)graphicElement2); if (this.Thickness != 0.0) { graphicElement2.Geometry.Extrusion = this.Thickness * Vector3D.ZAxis; } Class940.smethod_12((DrawContext)context, (IVertex2DCollection)this.dxfVertex2DCollection_0, this.Closed, this.Transform, this.Thickness, this.DefaultStartWidth, this.DefaultEndWidth, graphicElement2.Geometry); }
public override void DrawInternal( DrawContext.Surface context, Graphics graphics, IGraphicElementBlock parentGraphicElementBlock) { ArgbColor plotColor = context.GetPlotColor((DxfEntity)this); DxfLineType lineType = this.GetLineType((DrawContext)context); bool plinegen = (this.Flags & Enum21.flag_8) != Enum21.flag_0; double lineTypeScale = context.TotalLineTypeScale * this.LineTypeScale; if (!graphics.AddExistingGraphicElement2(parentGraphicElementBlock, (DxfEntity)this, plotColor, lineType, lineTypeScale, plinegen)) { return; } GraphicElement2 graphicElement2 = new GraphicElement2(plotColor, lineType, lineTypeScale, plinegen); graphics.AddNewGraphicElement((DxfEntity)this, parentGraphicElementBlock, (GraphicElement1)graphicElement2); if (this.Thickness != 0.0) { graphicElement2.Geometry.Extrusion = this.Thickness * Vector3D.ZAxis; } bool flag = false; if (context.Config.ShowSplineInterpolatedPoints) { switch (this.splineType_0) { case SplineType.None: if (this.dxfVertex2DCollection_1.Count > 0) { bool allWidthsAreZero = this.method_32(this.dxfVertex2DCollection_1); this.method_14((DrawContext)context, graphicElement2.Geometry, (DxfPolyline2DSpline.Interface43) new DxfPolyline2DSpline.Class947(this), allWidthsAreZero); flag = allWidthsAreZero && this.Thickness == 0.0; break; } break; case SplineType.QuadraticBSpline: if (this.dxfVertex2DCollection_0.Count > 0) { bool allWidthsAreZero = this.method_32(this.dxfVertex2DCollection_0); this.method_14((DrawContext)context, graphicElement2.Geometry, (DxfPolyline2DSpline.Interface43) new DxfPolyline2DSpline.Class948(this, 2, context.Config), allWidthsAreZero); break; } break; case SplineType.CubicBSpline: if (this.dxfVertex2DCollection_0.Count > 0) { bool allWidthsAreZero = this.method_32(this.dxfVertex2DCollection_0); this.method_14((DrawContext)context, graphicElement2.Geometry, (DxfPolyline2DSpline.Interface43) new DxfPolyline2DSpline.Class948(this, 3, context.Config), allWidthsAreZero); break; } break; } } DxfHeader header = context.Model.Header; GraphicsConfig config = context.Config; if (config.ShowSplineControlPoints && this.dxfVertex2DCollection_0.Count > 0) { graphicElement2.Geometry.Add((IPrimitive) new WW.Cad.Drawing.Surface.Polyline2DE(this.method_17(), this.Transform)); } if (!config.ShowSplineApproximationPoints || this.dxfVertex2DCollection_1.Count <= 0 || flag) { return; } graphicElement2.Geometry.Add((IPrimitive) new WW.Cad.Drawing.Surface.Polyline2DE(this.method_19(), this.Transform)); }