Parent Directory
|
Revision Log
|
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) |
|
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |