/[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 938 by jonathan, Tue May 20 15:25:10 2003 UTC revision 965 by jonathan, Wed May 21 17:24:22 2003 UTC
# Line 72  class MapRenderer: Line 72  class MapRenderer:
72          self.map = map          self.map = map
73          seenRaster = True          seenRaster = True
74    
75            if self.scale == 0:
76                return
77    
78          #          #
79          # This is only a good optimization if there is only one          # This is only a good optimization if there is only one
80          # raster layer and the image covers the entire window (as          # raster layer and the image covers the entire window (as
# Line 189  class MapRenderer: Line 192  class MapRenderer:
192              for p in proj.GetAllParameters():              for p in proj.GetAllParameters():
193                  outProj += "+" + p + " "                  outProj += "+" + p + " "
194    
         print "self.scale: ", self.scale, offx, offy, width, height  
195          xmin = (0 - offx) / self.scale          xmin = (0 - offx) / self.scale
196          ymin = (offy - height) / self.scale          ymin = (offy - height) / self.scale
197          xmax = (width - offx) / self.scale          xmax = (width - offx) / self.scale
# Line 202  class MapRenderer: Line 204  class MapRenderer:
204                  outProj,                  outProj,
205                  str(xmin), str(ymin), str(xmax), str(ymax),                  str(xmin), str(ymin), str(xmax), str(ymax),
206                  "", str(width), str(height));                  "", str(width), str(height));
207          except (AttributeError, IOError, ValueError):          except IOError, (strerr):
208                print strerr
209            except (AttributeError, ValueError):
210              pass              pass
211          else:          else:
212              if data is not None:              if data is not None:

Legend:
Removed from v.938  
changed lines
  Added in v.965

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26