Exemple #1
0
        protected override void OnRenderInternal(Map map, Polygon polygon, Graphics g)
        {
            var pts = /*LimitValues(*/ polygon.TransformToImage(map) /*)*/;

            if (UseClipping)
            {
                pts = VectorRenderer.ClipPolygon(pts, map.Size.Width, map.Size.Height);
            }

            if (Fill != null)
            {
                g.FillPolygon(Fill, pts);
            }

            if (Outline != null)
            {
                g.DrawPolygon(Outline, pts);
            }
        }
Exemple #2
0
        /// <summary>
        /// Method that does the actual rendering of geometries
        /// </summary>
        /// <param name="map">The map</param>
        /// <param name="polygon">The feature</param>
        /// <param name="g">The graphics object</param>
        protected override void OnRenderInternal(IMapViewPort map, IPolygon polygon, Graphics g)
        {
            // convert points
            var pts = /*LimitValues(*/ polygon.TransformToImage(map) /*)*/;

            // clip
            if (UseClipping)
            {
                pts = VectorRenderer.ClipPolygon(pts, map.Size.Width, map.Size.Height);
            }

            // fill the polygon
            if (Fill != null)
            {
                g.FillPolygon(Fill, pts);
            }

            // outline the polygon
            if (Outline != null)
            {
                g.DrawPolygon(Outline, pts);
            }
        }
Exemple #3
0
        protected override void OnRenderInternal(Map map, Polygon polygon, Graphics g)
        {
            var pts = /*LimitValues(*/ polygon.TransformToImage(map) /*)*/;

            if (UseClipping)
            {
                pts = VectorRenderer.ClipPolygon(pts, map.Size.Width, map.Size.Height);
            }

            if (Fill != null)
            {
                g.FillPolygon(Fill, pts);
            }

            if (Outline != null)
            {
                Outline.Render(map, polygon.ExteriorRing, g);
                foreach (var ls in polygon.InteriorRings)
                {
                    Outline.Render(map, ls, g);
                }
            }
        }