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

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

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

revision 44 by bh, Fri Sep 7 11:55:51 2001 UTC revision 45 by bh, Fri Sep 7 15:00:21 2001 UTC
# Line 337  class MapCanvas(wxWindow): Line 337  class MapCanvas(wxWindow):
337      def FitRectToWindow(self, rect):      def FitRectToWindow(self, rect):
338          width, height = self.GetSizeTuple()          width, height = self.GetSizeTuple()
339          llx, lly, urx, ury = rect          llx, lly, urx, ury = rect
340            if llx == urx or lly == ury:
341                # zero with or zero height. Do Nothing
342                return
343          scalex = width / (urx - llx)          scalex = width / (urx - llx)
344          scaley = height / (ury - lly)          scaley = height / (ury - lly)
345          scale = min(scalex, scaley)          scale = min(scalex, scaley)

Legend:
Removed from v.44  
changed lines
  Added in v.45

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26