コード例 #1
0
ファイル: DxfPolyline2DBase.cs プロジェクト: 15831944/WW
        public override void DrawInternal(
            DrawContext.Surface context,
            ISurfaceGraphicsFactory graphicsFactory)
        {
            IList <IList <Polyline2D2N> > polylines1;
            IList <IList <Polyline2D2N> > polylines2;
            IList <FlatShape4D>           shapes;
            bool fill;

            this.GetPolylines((DrawContext)context, context.GetTransformer().LineTypeScaler, out polylines1, out polylines2, out shapes, out fill);
            ArgbColor plotColor = context.GetPlotColor((DxfEntity)this);

            graphicsFactory.SetColor(plotColor);
            int count = polylines1.Count;

            for (int index = 0; index < count; ++index)
            {
                IList <Polyline2D2N> polyline2D2NList = polylines1[index];
                IList <Polyline2D2N> polylinesB       = polylines2[index];
                bool flag = this.Thickness != 0.0;
                if (polylinesB == null)
                {
                    if (flag)
                    {
                        Class940.smethod_5((DxfEntity)this, context, graphicsFactory, polyline2D2NList, fill, this.Transform, this.ZAxis, this.Thickness);
                    }
                    else
                    {
                        IList <Polyline3D> polyline3DList = (IList <Polyline3D>) new List <Polyline3D>();
                        DxfUtil.smethod_15(polyline2D2NList, (IList <Polyline2D2N>)null, this.Transform, polyline3DList, false);
                        Class940.smethod_15((DxfEntity)this, context, graphicsFactory, polyline3DList);
                    }
                }
                else if (flag)
                {
                    Class940.smethod_7((DxfEntity)this, context, graphicsFactory, polyline2D2NList, polylinesB, fill, this.Transform, this.ZAxis, this.Thickness);
                }
                else
                {
                    Class940.smethod_10((DxfEntity)this, context, graphicsFactory, polyline2D2NList, polylinesB, this.Transform, this.ZAxis, fill);
                }
                if (shapes != null)
                {
                    Class473 class473 = new Class473((DxfEntity)this, context, graphicsFactory);
                    foreach (FlatShape4D flatShape4D in (IEnumerable <FlatShape4D>)shapes)
                    {
                        class473.DrawPath(flatShape4D.FlatShape, flatShape4D.Transformation, this.Color.ToColor(), (short)0, flatShape4D.IsFilled, false, this.Thickness);
                    }
                }
            }
        }