예제 #1
0
        public void Render(LittleSharpRenderEngine engine, Graphics graphics, IPolygon polygon, IAreaStyle style)
        {
            if (polygon == null || style == null) return;

            System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();

            gp.AddPolygon(RenderUtil.CoordToPoint(polygon.Shell.Coordinates));
            foreach (ILinearRing l in polygon.Holes)
                gp.AddPolygon(RenderUtil.CoordToPoint(l.Coordinates));
            gp.CloseFigure();

            if (style.Fill != null) RenderUtil.RenderFill(engine, graphics, gp, style.Fill);

            if (style.Outline != null) RenderUtil.RenderOutline(engine, graphics, gp, style.Outline);
        }
예제 #2
0
        public void Render(LittleSharpRenderEngine engine, Graphics graphics, IPolygon polygon, IAreaStyle style)
        {
            if (polygon == null || style == null)
            {
                return;
            }

            System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();

            gp.AddPolygon(RenderUtil.CoordToPoint(polygon.Shell.Coordinates));
            foreach (ILinearRing l in polygon.Holes)
            {
                gp.AddPolygon(RenderUtil.CoordToPoint(l.Coordinates));
            }
            gp.CloseFigure();

            if (style.Fill != null)
            {
                RenderUtil.RenderFill(engine, graphics, gp, style.Fill);
            }

            if (style.Outline != null)
            {
                RenderUtil.RenderOutline(engine, graphics, gp, style.Outline);
            }
        }