69 |
if (layer.ShapeStore().RawShapeFormat() == RAW_SHAPEFILE |
if (layer.ShapeStore().RawShapeFormat() == RAW_SHAPEFILE |
70 |
and layer.ShapeType() in (SHAPETYPE_ARC, SHAPETYPE_POLYGON)): |
and layer.ShapeType() in (SHAPETYPE_ARC, SHAPETYPE_POLYGON)): |
71 |
offx, offy = self.offset |
offx, offy = self.offset |
72 |
return (draw_polygon_shape, |
return (True, draw_polygon_shape, |
73 |
draw_polygon_init(layer.ShapeStore().Shapefile(), |
draw_polygon_init(layer.ShapeStore().Shapefile(), |
74 |
self.dc, self.map.projection, |
self.dc, self.map.projection, |
75 |
layer.projection, |
layer.projection, |
112 |
brush = wxBrush(wxBLACK, wxCROSS_HATCH) |
brush = wxBrush(wxBLACK, wxCROSS_HATCH) |
113 |
|
|
114 |
shapetype = layer.ShapeType() |
shapetype = layer.ShapeType() |
115 |
func, param = self.low_level_renderer(layer) |
useraw, func, param = self.low_level_renderer(layer) |
116 |
args = (pen, brush) |
args = (pen, brush) |
117 |
for index in self.selected_shapes: |
for index in self.selected_shapes: |
118 |
func(param, index, *args) |
shape = layer.Shape(index) |
119 |
|
if useraw: |
120 |
|
data = shape.RawData() |
121 |
|
else: |
122 |
|
data = shape.Points() |
123 |
|
func(param, data, *args) |
124 |
|
|
125 |
def layer_ids(self, layer): |
def layer_shapes(self, layer): |
126 |
"""Return the shapeids covered by the region that has to be redrawn |
"""Return the shapeids covered by the region that has to be redrawn |
127 |
|
|
128 |
Call the layer's ShapesInRegion method to determine the ids so |
Call the layer's ShapesInRegion method to determine the ids so |
269 |
# Render the legend |
# Render the legend |
270 |
dc.SetTextForeground(wxBLACK) |
dc.SetTextForeground(wxBLACK) |
271 |
if map.HasLayers(): |
if map.HasLayers(): |
272 |
layers = map.Layers() |
layers = map.Layers()[:] |
273 |
layers.reverse() |
layers.reverse() |
274 |
for l in layers: |
for l in layers: |
275 |
if l.Visible(): |
if l.Visible(): |