Esempio n. 1
0
        private void FillEllipse(DxfDocument dxf, Layer layer, Ellipse dxfEllipse, Core2D.Style.ArgbColor color)
        {
            var fill = ToColor(color);
            var fillTransparency = ToTransparency(color);

            // TODO: The netDxf does not create hatch for Ellipse with end angle equal to 360.
            var bounds =
                new List<HatchBoundaryPath>
                {
                        new HatchBoundaryPath(
                            new List<EntityObject>
                            {
                                (Ellipse)dxfEllipse.Clone()
                            })
                };

            var hatch = new Hatch(HatchPattern.Solid, bounds, false);
            hatch.Layer = layer;
            hatch.Color = fill;
            hatch.Transparency.Value = fillTransparency;

            dxf.AddEntity(hatch);
        }