/[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 144 by bh, Tue May 7 14:54:02 2002 UTC revision 148 by bh, Tue May 7 16:40:29 2002 UTC
# Line 197  class ScreenRenderer(MapRenderer): Line 197  class ScreenRenderer(MapRenderer):
197      def RenderMap(self, map, region, selected_layer, selected_shape):      def RenderMap(self, map, region, selected_layer, selected_shape):
198          """Render the map.          """Render the map.
199    
200          Only the given region (a wxRect in window coordinates) needs to          Only the given region (a tuple in window coordinates as returned
201          be redrawn. Highlight the shape with id selected_shape in the          by a wxrect's asTuple method) needs to be redrawn. Highlight the
202          selected_layer.          shape with id selected_shape in the selected_layer.
203          """          """
204          self.update_region = region          self.update_region = region
205          self.selected_layer = selected_layer          self.selected_layer = selected_layer
# Line 246  class ScreenRenderer(MapRenderer): Line 246  class ScreenRenderer(MapRenderer):
246          offx, offy = self.offset          offx, offy = self.offset
247          xs = []          xs = []
248          ys = []          ys = []
249          x, y, width, height = self.update_region.asTuple()          x, y, width, height = self.update_region
250          for winx, winy in ((x, y), (x + width, y),          for winx, winy in ((x, y), (x + width, y),
251                             (x + width, y + height), (x, y + height)):                             (x + width, y + height), (x, y + height)):
252              px = (winx - offx) / scale              px = (winx - offx) / scale

Legend:
Removed from v.144  
changed lines
  Added in v.148

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26