Пример #1
0
        public static void RenderPolygon(Graphics g, Pen pen, MG_MapView mapview, MG_Polygon polygon)
        {
            int countLineString = polygon.Count();

            for (int i = 0; i < countLineString; i++)
            {
                MG_LineString lineString = polygon.GetAt(i);
                int           countPoint = lineString.Count();
                if (countPoint < 3)
                {
                    return;
                }
                Point[] points = new Point[countPoint];
                for (int j = 0; j < countPoint; j++)
                {
                    MG_Point mp = lineString.GetAt(j);
                    points[j] = AsPoint(mp, mapview);
                }
                //FillPolygon(g, brush, points);
                //Pen pen = new Pen(Color.Red, 1);
                DrawPolygon(g, pen, points);
            }
        }