Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
 public void Draw(IWireframeGraphicsFactory graphicsFactory)
 {
     graphicsFactory.CreateDot(this.entity, this.drawContext, this.color, this.bool_0, this.vector4D_0);
 }