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

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

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

revision 2617 by jonathan, Fri May 6 14:18:00 2005 UTC revision 2700 by dpinte, Mon Sep 18 14:27:02 2006 UTC
# Line 454  class BaseRenderer: Line 454  class BaseRenderer:
454    
455          # True  -- warp the image to the size of the whole screen          # True  -- warp the image to the size of the whole screen
456          # False -- only use the bound box of the layer (currently inaccurate)          # False -- only use the bound box of the layer (currently inaccurate)
457          if True:          if True:
458          #if False:          #if False:
459              pmin = [0,height]              pmin = [0,height]
460              pmax = [width, 0]              pmax = [width, 0]
# Line 466  class BaseRenderer: Line 466  class BaseRenderer:
466          #print bb          #print bb
467          #print pmin, pmax          #print pmin, pmax
468    
469          fmin = [max(0, min(pmin[0], pmax[0])) - offx,          fmin = [max(0, min(pmin[0], pmax[0])) - offx,
470                  offy - min(height, max(pmin[1], pmax[1]))]                  offy - min(height, max(pmin[1], pmax[1]))]
471    
472          fmax = [min(width, max(pmin[0], pmax[0])) - offx,          fmax = [min(width, max(pmin[0], pmax[0])) - offx,
473                  offy - max(0, min(pmin[1], pmax[1]))]                  offy - max(0, min(pmin[1], pmax[1]))]
474    
475          xmin = fmin[0]/self.scale          xmin = fmin[0]/self.scale
# Line 483  class BaseRenderer: Line 483  class BaseRenderer:
483          options = 0          options = 0
484          options = options | layer.MaskType()          options = options | layer.MaskType()
485    
486          img_data = self.projected_raster_layer(layer, in_proj, out_proj,          img_data = self.projected_raster_layer(layer, in_proj, out_proj,
487                      (xmin,ymin,xmax,ymax), [0,0], (width, height), options)                      (xmin,ymin,xmax,ymax), [0,0], (width, height), options)
488    
489          if img_data is not None:          if img_data is not None:
490              data = (width, height, img_data)              data = (width, height, img_data)
491              self.draw_raster_data(fmin[0]+offx, offy-fmax[1],              self.draw_raster_data(fmin[0]+offx, offy-fmax[1],
492                                    data, format="RAW", opacity=layer.Opacity())                                    data, format="RAW", opacity=layer.Opacity())
493              data = None              data = None
494    

Legend:
Removed from v.2617  
changed lines
  Added in v.2700

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26