/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/view.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/view.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1218 by bh, Fri May 30 09:54:48 2003 UTC revision 1219 by bh, Mon Jun 16 17:42:54 2003 UTC
# Line 945  class MapCanvas(wxWindow, Publisher): Line 945  class MapCanvas(wxWindow, Publisher):
945    
946              if shapetype == SHAPETYPE_POLYGON:              if shapetype == SHAPETYPE_POLYGON:
947                  for i in shape_ids:                  for i in shape_ids:
948                      result = point_in_polygon_shape(layer.shapefile.cobject(),                      shapefile = layer.ShapeStore().Shapefile().cobject()
949                                                      i,                      result = point_in_polygon_shape(shapefile, i,
950                                                      filled, stroked,                                                      filled, stroked,
951                                                      map_proj, layer_proj,                                                      map_proj, layer_proj,
952                                                      scale, -scale, offx, offy,                                                      scale, -scale, offx, offy,
# Line 956  class MapCanvas(wxWindow, Publisher): Line 956  class MapCanvas(wxWindow, Publisher):
956                          break                          break
957              elif shapetype == SHAPETYPE_ARC:              elif shapetype == SHAPETYPE_ARC:
958                  for i in shape_ids:                  for i in shape_ids:
959                      result = point_in_polygon_shape(layer.shapefile.cobject(),                      shapefile = layer.ShapeStore().Shapefile().cobject()
960                        result = point_in_polygon_shape(shapefile,
961                                                      i, 0, 1,                                                      i, 0, 1,
962                                                      map_proj, layer_proj,                                                      map_proj, layer_proj,
963                                                      scale, -scale, offx, offy,                                                      scale, -scale, offx, offy,
# Line 1018  class MapCanvas(wxWindow, Publisher): Line 1019  class MapCanvas(wxWindow, Publisher):
1019              # a label was selected              # a label was selected
1020              label_layer.RemoveLabel(shape_index)              label_layer.RemoveLabel(shape_index)
1021          elif layer is not None:          elif layer is not None:
1022              text = labeldialog.run_label_dialog(self, layer.table, shape_index)              text = labeldialog.run_label_dialog(self,
1023                                                    layer.ShapeStore().Table(),
1024                                                    shape_index)
1025              if text:              if text:
1026                  proj = self.map.projection                  proj = self.map.projection
1027                  if proj is not None:                  if proj is not None:
# Line 1033  class MapCanvas(wxWindow, Publisher): Line 1036  class MapCanvas(wxWindow, Publisher):
1036    
1037                  shapetype = layer.ShapeType()                  shapetype = layer.ShapeType()
1038                  if shapetype == SHAPETYPE_POLYGON:                  if shapetype == SHAPETYPE_POLYGON:
1039                      x, y = shape_centroid(layer.shapefile.cobject(),                      shapefile = layer.ShapeStore().Shapefile().cobject()
1040                                            shape_index,                      x, y = shape_centroid(shapefile, shape_index,
1041                                            map_proj, layer_proj, 1, 1, 0, 0)                                            map_proj, layer_proj, 1, 1, 0, 0)
1042                      if map_proj is not None:                      if map_proj is not None:
1043                          x, y = map_proj.Inverse(x, y)                          x, y = map_proj.Inverse(x, y)

Legend:
Removed from v.1218  
changed lines
  Added in v.1219

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26