Пример #1
0
 private void SetPolygonArea(GeoPolygonRegion geoPolygonList)
 {
     foreach (GeoPolygon polygon in geoPolygonList)
     {
         Huawei.UNet.GIS.GeoUI.Polygon polygon2 = new Huawei.UNet.GIS.GeoUI.Polygon();
         foreach (GeoXYPoint point in polygon.Points)
         {
             polygon2.Points.Add(this.m_Transformation.PlaneToScreen(point));
         }
         if (polygon2.GetPolygonArea() > 0xea60)
         {
             this.m_Transformation.ZoomedIn(0.6);
             this.SetPolygonArea(geoPolygonList);
         }
     }
 }
Пример #2
0
 private void TransformPolygonDict(int id, GeoPolygonRegion geoPolygonList)
 {
     List<Huawei.UNet.GIS.GeoUI.Polygon> list = new List<Huawei.UNet.GIS.GeoUI.Polygon>();
     foreach (GeoPolygon polygon in geoPolygonList)
     {
         Huawei.UNet.GIS.GeoUI.Polygon item = new Huawei.UNet.GIS.GeoUI.Polygon();
         foreach (GeoXYPoint point in polygon.Points)
         {
             item.Points.Add(this.m_Transformation.PlaneToScreen(point));
         }
         list.Add(item);
     }
     this.m_PolygonDict.Add(id, list);
 }
Пример #3
0
 private void DrawPolygon(Huawei.UNet.GIS.GeoUI.Polygon polygon, Graphics gra)
 {
     Point point = new Point(this.m_left - 10, this.m_top - 10);
     Huawei.UNet.GIS.GeoUI.Polygon polygon2 = new Huawei.UNet.GIS.GeoUI.Polygon();
     foreach (Point point2 in polygon.Points)
     {
         polygon2.Points.Add(new Point(point2.X - point.X, point2.Y - point.Y));
     }
     Pen pen = new Pen(Color.Red, 1f);
     Brush brush = new SolidBrush(Color.Red);
     Point[] points = polygon2.Points.ToArray();
     int length = points.Length;
     if (points.Length != 0)
     {
         for (int i = 0; i < length; i++)
         {
             Rectangle rect = new Rectangle(points[i].X - 2, points[i].Y - 2, 4, 4);
             gra.DrawEllipse(pen, rect);
             gra.FillEllipse(brush, rect);
         }
         if (points.Length != 1)
         {
             gra.DrawPolygon(pen, points);
             pen.Dispose();
             brush.Dispose();
         }
     }
 }