Beispiel #1
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            Polyline3DT          imageBoundaryPolyline;
            IClippingTransformer transformer;
            IList <Polyline4D>   polylines1 = this.method_16(context, out imageBoundaryPolyline, out transformer);

            if (polylines1.Count <= 0)
            {
                return;
            }
            graphicsFactory.CreatePath((DxfEntity)this, context, context.Config.BackColor, false, polylines1, true, false);
            IList <FlatShape4D> flatShape4DList = (IList <FlatShape4D>)null;

            if (!context.WipeoutVariables.DisplayFrame)
            {
                return;
            }
            IList <WW.Math.Geometry.Polyline3D> polyline3DList;

            if (context.Config.ApplyLineType)
            {
                IList <FlatShape4D> resultShapes = (IList <FlatShape4D>) new List <FlatShape4D>();
                polyline3DList = (IList <WW.Math.Geometry.Polyline3D>) new List <WW.Math.Geometry.Polyline3D>();
                Vector3D upward = Vector3D.CrossProduct(this.XAxis, this.YAxis);
                if (upward == Vector3D.Zero)
                {
                    upward = Vector3D.ZAxis;
                }
                else
                {
                    upward.Normalize();
                }
                DxfUtil.smethod_11(context.Config, polyline3DList, resultShapes, imageBoundaryPolyline, this.GetLineType((DrawContext)context), upward, context.TotalLineTypeScale * this.LineTypeScale, context.GetTransformer().LineTypeScaler);
                if (resultShapes.Count == 0)
                {
                    flatShape4DList = (IList <FlatShape4D>)null;
                }
            }
            else
            {
                polyline3DList = (IList <WW.Math.Geometry.Polyline3D>) new WW.Math.Geometry.Polyline3D[1]
                {
                    imageBoundaryPolyline.ToPolyline3D()
                };
                flatShape4DList = (IList <FlatShape4D>)null;
            }
            IList <Polyline4D> polylines2 = DxfUtil.smethod_36(polyline3DList, false, transformer);

            graphicsFactory.CreatePath((DxfEntity)this, context, this.GetColor((DrawContext)context), false, polylines2, false, true);
        }
Beispiel #2
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            IList <Polyline4D>  polylines4D;
            IList <FlatShape4D> shapes;
            bool fill;

            this.GetPolylines4D((DrawContext)context, context.GetTransformer(), out polylines4D, out shapes, out fill);
            ArgbColor plotColor = context.GetPlotColor((DxfEntity)this);

            if (polylines4D.Count > 0)
            {
                graphicsFactory.CreatePath((DxfEntity)this, context, plotColor, false, polylines4D, fill, true);
            }
            if (shapes == null)
            {
                return;
            }
            IPathDrawer pathDrawer = (IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory);

            foreach (FlatShape4D flatShape4D in (IEnumerable <FlatShape4D>)shapes)
            {
                pathDrawer.DrawPath(flatShape4D.FlatShape, flatShape4D.Transformation, this.Color.ToColor(), (short)0, flatShape4D.IsFilled, false, this.Thickness);
            }
        }
Beispiel #3
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            IList <Polyline3D>  polylines1;
            IList <FlatShape4D> shapes;

            this.method_14((DrawContext)context, context.GetTransformer().LineTypeScaler, out polylines1, out shapes);
            IList <Polyline4D> polylines2 = DxfUtil.smethod_36(polylines1, false, context.GetTransformer());

            if (polylines2.Count > 0)
            {
                graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this, this.dxfDimensionStyleOverrides_0.DimensionLineColor), false, polylines2, false, true);
            }
            if (shapes != null)
            {
                Class940.smethod_23((IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, this.dxfDimensionStyleOverrides_0.DimensionLineColor, context.GetLineWeight((DxfEntity)this));
            }
            if (!DxfLeader.smethod_7((ILeader)this, (IList <WW.Math.Point3D>) this.list_0))
            {
                return;
            }
            if (this.dxfDimensionStyleOverrides_0.LeaderArrowBlock == null)
            {
                Polyline3D polyline = this.method_15();
                if (polyline == null)
                {
                    return;
                }
                IClippingTransformer clippingTransformer = (IClippingTransformer)context.GetTransformer().Clone();
                clippingTransformer.SetPreTransform(this.method_16());
                List <Polyline4D> polyline4DList = new List <Polyline4D>((IEnumerable <Polyline4D>)clippingTransformer.Transform(polyline, polyline.Closed));
                if (polyline4DList.Count <= 0)
                {
                    return;
                }
                graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this, this.dxfDimensionStyleOverrides_0.DimensionLineColor), false, (IList <Polyline4D>)polyline4DList, true, true);
            }
            else
            {
                DxfInsert.Interface46 nterface46 = (DxfInsert.Interface46) new DxfInsert.Class1019((DxfEntity)this, context, graphicsFactory);
                nterface46.imethod_0(0, 0, this.method_16());
                nterface46.Draw(this.dxfDimensionStyleOverrides_0.LeaderArrowBlock, true);
            }
        }
Beispiel #4
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            IList <Polyline4D> polylines4D = this.GetPolylines4D(context.GetTransformer());

            if (polylines4D.Count <= 0)
            {
                return;
            }
            graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines4D, context.Model.Header.FillMode && this.vector3D_0.X == 0.0 && this.vector3D_0.Y == 0.0, true);
        }
Beispiel #5
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            IList <Polyline4D> polylines4D;
            bool fill;

            this.GetPolylines4D(context.GetTransformer(), out polylines4D, out fill);
            if (polylines4D.Count <= 0)
            {
                return;
            }
            graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines4D, fill, true);
        }
Beispiel #6
0
        internal void method_20(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            ArgbColor[] argbColorArray = new ArgbColor[10] {
                ArgbColors.Red, ArgbColors.Green, ArgbColors.Blue, ArgbColors.Magenta, ArgbColors.Cyan, ArgbColors.Violet, ArgbColors.Orange, ArgbColors.YellowGreen, ArgbColors.Purple, ArgbColors.DarkOrchid
            };
            ArgbColor          color     = argbColorArray[(int)this.Id % argbColorArray.Length];
            IList <Polyline4D> polylines = this.method_21((DrawContext)context, context.GetTransformer());

            if (polylines.Count <= 0)
            {
                return;
            }
            graphicsFactory.CreatePath((DxfEntity)this, context, color, false, polylines, false, true);
        }
Beispiel #7
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            if (!this.PaperSpace || !(context is DrawContext.Wireframe.PaperToPaperSpace) || (!this.method_22((DrawContext)context) || this.UseNonRectangularClipBoundary))
            {
                return;
            }
            IList <Polyline4D> polylines = this.method_21((DrawContext)context, context.GetTransformer());

            if (polylines.Count <= 0)
            {
                return;
            }
            graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines, false, true);
        }
Beispiel #8
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            IList <Polyline4D> polylines4D;
            IList <IShape4D>   shapes;

            this.GetPolylines4D((DrawContext)context, context.GetTransformer(), out polylines4D, out shapes);
            if (polylines4D.Count > 0)
            {
                graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines4D, false, true);
            }
            if (shapes == null)
            {
                return;
            }
            Class940.smethod_23((IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this));
        }
Beispiel #9
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            IClippingTransformer transformer = context.GetTransformer();
            IList <WW.Math.Geometry.Polyline3D> polylines1;
            IList <FlatShape4D> flatShapes;

            this.method_13((DrawContext)context, transformer, out polylines1, out flatShapes);
            IList <Polyline4D> polylines2 = DxfUtil.smethod_36(polylines1, false, transformer);

            if (polylines2.Count > 0)
            {
                graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines2, false, true);
            }
            if (flatShapes == null)
            {
                return;
            }
            Class940.smethod_23((IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)flatShapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this));
        }
Beispiel #10
0
 public override void DrawInternal(
     DrawContext.Wireframe context,
     IWireframeGraphicsFactory graphicsFactory)
 {
     if (context.Config.TryDrawingTextAsText && graphicsFactory.SupportsText)
     {
         graphicsFactory.CreateMText(this, context);
     }
     else
     {
         this.method_16((DrawContext)context, (IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory));
         if (!context.Config.ShowTextAlignmentPoints)
         {
             return;
         }
         IList <Polyline4D> polylines = DxfUtil.smethod_36(this.method_18(), false, context.GetTransformer());
         if (polylines.Count <= 0)
         {
             return;
         }
         graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), true, polylines, false, true);
     }
 }
Beispiel #11
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            IList <Polyline4D> polyline4DList = context.GetTransformer().Transform(this.method_14(), true);

            if (polyline4DList == null || polyline4DList.Count <= 0)
            {
                return;
            }
            IList <Polyline4D> polylines4D;
            IList <IShape4D>   shapes;

            this.GetPolylines4D((DrawContext)context, context.GetTransformer(), out polylines4D, out shapes);
            IClippingTransformer clippingTransformer = (IClippingTransformer)context.GetTransformer().Clone();
            Matrix4D             preTransform        = Transformation4D.Translation((WW.Math.Vector3D) this.point3D_3);

            clippingTransformer.SetPreTransform(preTransform);
            Matrix4D matrix = clippingTransformer.Matrix;

            WW.Math.Point3D zero = WW.Math.Point3D.Zero;
            Vector4D        transformedOrigin = matrix.TransformTo4D(zero);
            Vector4D        transformedXAxis  = matrix.TransformTo4D(zero + WW.Math.Vector3D.XAxis);
            Vector4D        transformedYAxis  = matrix.TransformTo4D(zero + WW.Math.Vector3D.YAxis);

            graphicsFactory.CreateScalableImage((DxfEntity)this, context, (IBitmapProvider)this, polyline4DList[0], new Size2D((this.point3D_2 - this.point3D_3).GetLength(), (this.point3D_0 - this.point3D_3).GetLength()), transformedOrigin, transformedXAxis, transformedYAxis);
            if (polylines4D.Count > 0)
            {
                graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines4D, false, true);
            }
            if (shapes == null)
            {
                return;
            }
            Class940.smethod_23((IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this));
        }
Beispiel #12
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory graphicsFactory)
        {
            if (this.list_0.Count == 0)
            {
                return;
            }
            DxfLayer      layer           = this.GetLayer((DrawContext)context);
            int           minElementCount = this.method_15();
            DxfMLineStyle style           = this.Style;

            if (style == null)
            {
                return;
            }
            for (int elementIndex = 0; elementIndex < style.Elements.Count; ++elementIndex)
            {
                DxfMLineStyle.Element element = style.Elements[elementIndex];
                IList <Polyline4D>    polylines4D;
                IList <IShape4D>      shapes;
                this.GetPolylines4D((DrawContext)context, elementIndex, minElementCount, element, context.GetTransformer(), out polylines4D, out shapes);
                ArgbColor color = DxfEntity.GetColor(context.Config.IndexedColors, element.Color, context.ByBlockColor, context.ByBlockDxfColor, layer);
                if (polylines4D.Count > 0)
                {
                    foreach (Polyline4D polyline4D in (IEnumerable <Polyline4D>)polylines4D)
                    {
                        if (polyline4D.Count <= 2)
                        {
                            polyline4D.Closed = false;
                        }
                    }
                    graphicsFactory.CreatePath((DxfEntity)this, context, color, false, polylines4D, false, true);
                }
                if (shapes != null)
                {
                    Class940.smethod_23((IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, element.Color, context.GetLineWeight((DxfEntity)this));
                }
            }
            IList <Polyline4D> polylines1 = this.method_14((DrawContext)context, context.GetTransformer());

            if (polylines1.Count > 0)
            {
                foreach (Polyline4D polyline4D in (IEnumerable <Polyline4D>)polylines1)
                {
                    if (polyline4D.Count <= 2)
                    {
                        polyline4D.Closed = false;
                    }
                }
                ArgbColor color = this.method_13((DrawContext)context, layer);
                graphicsFactory.CreatePath((DxfEntity)this, context, color, false, polylines1, false, true);
            }
            if (!style.IsFillOn)
            {
                return;
            }
            IList <Polyline4D> polylines2 = this.method_16(context.GetTransformer());

            if (polylines2 == null || polylines2.Count <= 0)
            {
                return;
            }
            graphicsFactory.CreatePath((DxfEntity)this, context, DxfEntity.GetColor(context.Config.IndexedColors, style.FillColor, context.ByBlockColor, context.ByBlockDxfColor, this.GetLayer((DrawContext)context)), false, polylines2, true, true);
        }
Beispiel #13
0
 public void Draw(IWireframeGraphicsFactory graphicsFactory)
 {
     graphicsFactory.CreatePath(this.entity, this.drawContext, this.color, this.bool_0, this.ilist_0, this.bool_1, this.bool_2);
 }