public void DrawPath( IShape2D path, Matrix4D transform, Color color, short lineWeight, bool filled, bool forText, double extrusion) { if (!path.HasSegments) { return; } IClippingTransformer transformer = (IClippingTransformer)this.wireframe_0.GetTransformer().Clone(); transformer.SetPreTransform(transform); IWireframeGraphicsFactory graphicsFactory0 = this.iwireframeGraphicsFactory_0; if (extrusion == 0.0) { IShape4D shape1 = (IShape4D) new FlatShape4D((IShape2D)(path as GeneralShape2D ?? new GeneralShape2D(path, true)), filled); IShape4D shape2 = transformer.Transform(shape1); if (shape2.IsEmpty) { return; } graphicsFactory0.CreateShape(this.dxfEntity_0, this.wireframe_0, this.wireframe_0.GetPlotColor(this.dxfEntity_0, color), forText, shape2); } else { IList <Polyline2D> flattened = (IList <Polyline2D>)ShapeTool.GetFlattened(path, this.wireframe_0.Config.ShapeFlattenEpsilon); IList <Polyline4D> polylines1 = DxfUtil.smethod_39(flattened, filled, transformer); ArgbColor plotColor = this.wireframe_0.GetPlotColor(this.dxfEntity_0, color); graphicsFactory0.CreatePathAsOne(this.dxfEntity_0, this.wireframe_0, plotColor, forText, polylines1, false, true); transformer.SetPreTransform(Transformation4D.Translation(0.0, 0.0, extrusion)); IList <Polyline4D> polylines2 = DxfUtil.smethod_39(flattened, filled, transformer); graphicsFactory0.CreatePathAsOne(this.dxfEntity_0, this.wireframe_0, plotColor, forText, polylines2, false, true); for (int index1 = polylines1.Count - 1; index1 >= 0; --index1) { Polyline4D polyline4D1 = polylines1[index1]; Polyline4D polyline4D2 = polylines2[index1]; for (int index2 = polyline4D1.Count - 1; index2 >= 0; --index2) { graphicsFactory0.CreateLine(this.dxfEntity_0, this.wireframe_0, plotColor, forText, polyline4D1[index2], polyline4D2[index2]); } } } }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { PointDisplayMode pointDisplayMode = context.Model.Header.PointDisplayMode; bool flag = this.Layer != null && this.Layer == context.DefPointsLayer; if (pointDisplayMode == PointDisplayMode.None && !flag) { return; } ArgbColor plotColor = context.GetPlotColor((DxfEntity)this); IClippingTransformer transformer = context.GetTransformer(); if (this.double_1 != 0.0) { foreach (Segment4D segment4D in (IEnumerable <Segment4D>)transformer.Transform(new Segment3D(this.point3D_0, this.point3D_0 + this.double_1 * this.vector3D_0))) { graphicsFactory.CreateLine((DxfEntity)this, context, plotColor, false, segment4D.Start, segment4D.End); } } else if (pointDisplayMode != PointDisplayMode.Point && context.Model.Header.PointDisplaySize > 0.0 && !flag) { IShape4D shape = transformer.Transform((IShape4D) new FlatShape4D(context.PointShape2D, Transformation4D.Translation(this.point3D_0.X, this.point3D_0.Y, this.point3D_0.Z), false)); if (shape.IsEmpty) { return; } graphicsFactory.CreateShape((DxfEntity)this, context, plotColor, false, shape); } else { Vector4D?nullable = transformer.Transform(this.point3D_0); if (!nullable.HasValue) { return; } graphicsFactory.CreateDot((DxfEntity)this, context, plotColor, false, nullable.Value); } }
public void Draw(IWireframeGraphicsFactory graphicsFactory) { graphicsFactory.CreateLine(this.entity, this.drawContext, this.color, this.bool_0, this.vector4D_0, this.vector4D_1); }