Esempio n. 1
0
        public override void DrawInternal(
            DrawContext.Wireframe context,
            IWireframeGraphicsFactory2 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)
            {
                Class940.smethod_3((DxfEntity)this, context, graphicsFactory, plotColor, false, fill, !fill, polylines4D);
            }
            if (shapes == null)
            {
                return;
            }
            IPathDrawer pathDrawer = (IPathDrawer) new Class396((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);
            }
        }
Esempio n. 2
0
        public override void DrawInternal(
            DrawContext.Surface context,
            ISurfaceGraphicsFactory graphicsFactory)
        {
            graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this));
            IList <WW.Math.Geometry.Polyline3D> polylines;
            IList <FlatShape4D> shapes;

            this.GetPolylines((DrawContext)context, context.GetTransformer().LineTypeScaler, out polylines, out shapes);
            if (this.double_1 != 0.0)
            {
                Class940.Extrude((DxfEntity)this, context, graphicsFactory, polylines, false, this.double_1 * this.vector3D_0);
            }
            else
            {
                Class940.smethod_16((DxfEntity)this, context, graphicsFactory, polylines, false);
            }
            if (shapes == null)
            {
                return;
            }
            IPathDrawer pathDrawer = (IPathDrawer) new Class473((DxfEntity)this, context, graphicsFactory);

            foreach (FlatShape4D flatShape4D in (IEnumerable <FlatShape4D>)shapes)
            {
                pathDrawer.DrawPath(flatShape4D.FlatShape, flatShape4D.Transformation, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this), flatShape4D.IsFilled, false, this.double_1);
            }
        }
Esempio n. 3
0
 public void Draw(
     IPathDrawer drawer,
     Matrix4D trafo,
     Color color,
     short lineWeight,
     double extent)
 {
     drawer.DrawPath(this.ishape2D_0, trafo, color, lineWeight, this.bool_0, true, extent);
 }
Esempio n. 4
0
 internal static void smethod_23(
     IPathDrawer pathDrawer,
     IEnumerable <IShape4D> shapes,
     WW.Cad.Model.Color color,
     short lineWeight)
 {
     foreach (IShape4D shape in shapes)
     {
         pathDrawer.DrawPath(shape, color, lineWeight);
     }
 }
Esempio n. 5
0
 internal static void smethod_24(
     IPathDrawer pathDrawer,
     IEnumerable <FlatShape4D> shapes,
     WW.Cad.Model.Color color,
     short lineWeight,
     double extrusion)
 {
     foreach (FlatShape4D shape in shapes)
     {
         pathDrawer.DrawPath(shape.FlatShape, shape.Transformation, color, lineWeight, shape.IsFilled, false, extrusion);
     }
 }
Esempio n. 6
0
        public void method_1(IPathDrawer drawer, Matrix4D insertionTransformation, double extrusion)
        {
            if (this.ishape2D_1 == null)
            {
                return;
            }
            Matrix4D transform = insertionTransformation * this.Transformation;

            foreach (IShape2D path in this.ishape2D_1)
            {
                drawer.DrawPath(path, transform, this.interface34_0.Color, this.interface34_0.LineWeight, false, true, extrusion);
            }
        }
Esempio n. 7
0
        public void Draw(IPathDrawer drawer, Matrix4D insertionTransformation, double extrusion)
        {
            Matrix4D matrix4D = insertionTransformation * this.Transformation;

            this.interface34_0.Draw(drawer, matrix4D, extrusion);
            if (this.ishape2D_1 == null)
            {
                return;
            }
            foreach (IShape2D path in this.ishape2D_1)
            {
                drawer.DrawPath(path, matrix4D, this.interface34_0.Color, this.interface34_0.LineWeight, false, true, extrusion);
            }
        }
Esempio n. 8
0
        public Vector3D Draw(IPathDrawer drawer, Matrix4D transformation, double extrusion)
        {
            Matrix4D matrix4D  = Matrix4D.Multiply(transformation, this.matrix2D_0);
            Vector2D zero      = Vector2D.Zero;
            Matrix4D transform = matrix4D;

            foreach (Interface35 nterface35 in this.interface35_0)
            {
                drawer.DrawPath(nterface35.Path, transform, this.color_0, this.short_0, this.Filled, true, extrusion);
                zero     += nterface35.Advance;
                transform = matrix4D * Transformation4D.Translation(new Vector3D(zero.X * this.double_0, zero.Y, 0.0));
            }
            return((Vector3D)transform.TransformTo3D((WW.Math.Point2D) this.vector2D_0));
        }
Esempio n. 9
0
        public Vector3D Draw(IPathDrawer drawer, Matrix4D transformation, double extrusion)
        {
            Matrix4D a         = Matrix4D.Multiply(transformation, this.matrix2D_0);
            Matrix4D transform = Matrix4D.Multiply(a, this.matrix2D_1);

            if (this.ishape2D_0 != null)
            {
                if (drawer.IsSeparateCharDrawingPreferred())
                {
                    foreach (Class1063 splitPath in this.SplitPaths)
                    {
                        drawer.DrawCharPath(splitPath.Shape, a * DxfUtil.smethod_61(splitPath.Transform), this.color_0, this.short_0, this.Filled, extrusion);
                    }
                }
                else
                {
                    drawer.DrawPath(this.ishape2D_0, transform, this.color_0, this.short_0, this.Filled, true, extrusion);
                }
            }
            return((Vector3D)transform.TransformTo3D((WW.Math.Point2D) this.vector2D_0));
        }
Esempio n. 10
0
            internal double Draw(
                DxfTolerance tolerance,
                IPathDrawer pathDrawer,
                Matrix4D preTransform,
                Color color,
                short lineWeight,
                double scale)
            {
                double           effectiveTextHeight = DxfDimensionStyle.GetEffectiveTextHeight((IDimensionStyle)tolerance.DimensionStyleOverrides, scale);
                double           num1             = tolerance.dxfDimensionStyleOverrides_0.TextHeight * scale;
                float            num2             = (float)(num1 * 0.5);
                Class985         resultLayoutInfo = new Class985();
                IList <Class908> class908List     = Class666.smethod_0(this.string_0, effectiveTextHeight, tolerance.DimensionStyleOverrides.TextStyle, tolerance.DimensionStyleOverrides.TextStyle.WidthFactor, color, lineWeight, preTransform * Transformation4D.Translation((double)num2, 0.0, 0.0), resultLayoutInfo, Enum24.flag_3);
                float            x           = (float)resultLayoutInfo.Bounds.Corner2.X;
                float            num3        = (float)(num1 * 2.0 * 0.5);
                Rectangle2D      rectangle2D = new Rectangle2D(0.0, -(double)num3, (double)x + (double)num2 * 2.0, 2.0 * (double)num3 - (double)num3);

                pathDrawer.DrawPath((IShape2D)rectangle2D, preTransform, color, lineWeight, false, false, 0.0);
                foreach (Class908 class908 in (IEnumerable <Class908>)class908List)
                {
                    class908.Draw(pathDrawer, Matrix4D.Identity, 0.0);
                }
                return((double)x + (double)num2 * 2.0);
            }
Esempio n. 11
0
        private void method_16(DrawContext context, IPathDrawer pathDrawer)
        {
            Bounds2D         collectBounds = new Bounds2D();
            IList <Class908> class908List  = Class666.smethod_4(this, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this), Matrix4D.Identity, collectBounds);

            if (this.backgroundFillFlags_0 == BackgroundFillFlags.UseBackgroundFillColor && this.backgroundFillInfo_0 != null)
            {
                double num1 = this.double_1 * (this.backgroundFillInfo_0.BorderOffsetFactor - 1.0);
                double num2 = this.double_2 == 0.0 ? collectBounds.Delta.X : this.double_2;
                double y    = collectBounds.Delta.Y;
                double num3;
                double num4;
                switch (this.AttachmentPoint)
                {
                case AttachmentPoint.TopLeft:
                    num3 = collectBounds.Corner1.X + 0.5 * num2;
                    num4 = collectBounds.Corner2.Y - 0.5 * y;
                    break;

                case AttachmentPoint.TopCenter:
                    num3 = collectBounds.Center.X;
                    num4 = collectBounds.Corner2.Y - 0.5 * y;
                    break;

                case AttachmentPoint.TopRight:
                    num3 = collectBounds.Corner2.X - 0.5 * num2;
                    num4 = collectBounds.Corner2.Y - 0.5 * y;
                    break;

                case AttachmentPoint.MiddleLeft:
                    num3 = collectBounds.Corner1.X + 0.5 * num2;
                    num4 = collectBounds.Center.Y;
                    break;

                case AttachmentPoint.MiddleCenter:
                    num3 = collectBounds.Center.X;
                    num4 = collectBounds.Center.Y;
                    break;

                case AttachmentPoint.MiddleRight:
                    num3 = collectBounds.Corner2.X - 0.5 * num2;
                    num4 = collectBounds.Center.Y;
                    break;

                case AttachmentPoint.BottomLeft:
                    num3 = collectBounds.Corner1.X + 0.5 * num2;
                    num4 = collectBounds.Corner1.Y + 0.5 * y;
                    break;

                case AttachmentPoint.BottomCenter:
                    num3 = collectBounds.Center.X;
                    num4 = collectBounds.Corner1.Y + 0.5 * y;
                    break;

                case AttachmentPoint.BottomRight:
                    num3 = collectBounds.Corner2.X - 0.5 * num2;
                    num4 = collectBounds.Corner1.Y + 0.5 * y;
                    break;

                default:
                    num3 = collectBounds.Center.X;
                    num4 = collectBounds.Center.Y;
                    break;
                }
                pathDrawer.DrawPath((IShape2D) new Rectangle2D(num3 - 0.5 * num2 - num1, num4 - 0.5 * y - num1, num3 + 0.5 * num2 + num1, num4 + 0.5 * y + num1), this.Transform, this.backgroundFillInfo_0.Color, context.GetLineWeight((DxfEntity)this), true, false, 0.0);
            }
            foreach (Class908 class908 in (IEnumerable <Class908>)class908List)
            {
                class908.Draw(pathDrawer, Matrix4D.Identity, 0.0);
            }
        }