198 |
# if honor_visibility is true, only draw visible layers, |
# if honor_visibility is true, only draw visible layers, |
199 |
# otherwise draw all layers |
# otherwise draw all layers |
200 |
if not self.honor_visibility or layer.Visible(): |
if not self.honor_visibility or layer.Visible(): |
201 |
if isinstance(layer, Layer) and seenRaster: |
if isinstance(layer, Layer): |
202 |
for i in self.draw_shape_layer_incrementally(layer): |
if seenRaster: |
203 |
yield True |
for i in self.draw_shape_layer_incrementally(layer): |
204 |
|
yield True |
205 |
elif isinstance(layer, RasterLayer) \ |
elif isinstance(layer, RasterLayer) \ |
206 |
and Thuban.Model.resource.has_gdal_support(): |
and Thuban.Model.resource.has_gdal_support(): |
207 |
self.draw_raster_layer(layer) |
self.draw_raster_layer(layer) |
289 |
data = shape.RawData() |
data = shape.RawData() |
290 |
else: |
else: |
291 |
data = shape.Points() |
data = shape.Points() |
292 |
draw_func(draw_func_param, data, pen, brush) |
if draw_func == self.draw_point_shape: |
293 |
|
draw_func(draw_func_param, data, pen, brush, |
294 |
|
size = group.GetProperties().GetSize()) |
295 |
|
else: |
296 |
|
draw_func(draw_func_param, data, pen, brush) |
297 |
if count % 500 == 0: |
if count % 500 == 0: |
298 |
yield True |
yield True |
299 |
|
|
425 |
for part in points: |
for part in points: |
426 |
self.dc.DrawLines(part) |
self.dc.DrawLines(part) |
427 |
|
|
428 |
def draw_point_shape(self, layer, points, pen, brush): |
def draw_point_shape(self, layer, points, pen, brush, size = 5): |
429 |
"""Draw a point shape from layer with the given brush and pen |
"""Draw a point shape from layer with the given brush and pen |
430 |
|
|
431 |
The shape is given by points argument which is a the return |
The shape is given by points argument which is a the return |
439 |
if not points: |
if not points: |
440 |
return |
return |
441 |
|
|
442 |
radius = int(round(self.resolution * 5)) |
radius = int(round(self.resolution * size)) |
443 |
self.dc.SetBrush(brush) |
self.dc.SetBrush(brush) |
444 |
self.dc.SetPen(pen) |
self.dc.SetPen(pen) |
445 |
for part in points: |
for part in points: |