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

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

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

revision 1103 by jonathan, Fri May 30 06:29:25 2003 UTC revision 1165 by jonathan, Thu Jun 12 12:42:10 2003 UTC
# Line 35  from Thuban.Model.label import ALIGN_CEN Line 35  from Thuban.Model.label import ALIGN_CEN
35    
36  from Thuban.Model.classification import Classification  from Thuban.Model.classification import Classification
37  from Thuban.Model.color import Color  from Thuban.Model.color import Color
38    import Thuban.Model.resource
39    
40  class MapRenderer:  class MapRenderer:
41    
# Line 78  class MapRenderer: Line 79  class MapRenderer:
79          #          #
80          # This is only a good optimization if there is only one          # This is only a good optimization if there is only one
81          # raster layer and the image covers the entire window (as          # raster layer and the image covers the entire window (as
82          # it currently does).          # it currently does). We note if there is a raster layer
83            # and only begin drawing layers once we have drawn it.
84            # That way we avoid drawing layers that won't be seen.
85          #          #
86          for layer in map.Layers():          for layer in map.Layers():
87              if isinstance(layer, RasterLayer):              if isinstance(layer, RasterLayer) and layer.Visible():
88                  seenRaster = False                  seenRaster = False
89                  break                  break
90    
# Line 91  class MapRenderer: Line 94  class MapRenderer:
94              if not self.honor_visibility or layer.Visible():              if not self.honor_visibility or layer.Visible():
95                  if isinstance(layer, Layer) and seenRaster:                  if isinstance(layer, Layer) and seenRaster:
96                      self.draw_shape_layer(layer)                      self.draw_shape_layer(layer)
97                  elif isinstance(layer, RasterLayer):                  elif isinstance(layer, RasterLayer) \
98                        and Thuban.Model.resource.has_gdal_support():
99                      self.draw_raster_layer(layer)                      self.draw_raster_layer(layer)
100                      seenRaster = True                      seenRaster = True
101    

Legend:
Removed from v.1103  
changed lines
  Added in v.1165

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26