Mercurial > boomslang
comparison pyntnclick/tools/rect_drawer.py @ 703:cbf6d4573785 pyntnclick
Fix bug in zooming code
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 04 Aug 2012 15:36:13 +0200 |
parents | 9c920deb28c2 |
children | 9b6d68ba627e |
comparison
equal
deleted
inserted
replaced
702:9a61cf88e6e8 | 703:cbf6d4573785 |
---|---|
287 | 287 |
288 if self.zoom_display: | 288 if self.zoom_display: |
289 base_surface = surface.copy() | 289 base_surface = surface.copy() |
290 self.do_unzoomed_draw(base_surface) | 290 self.do_unzoomed_draw(base_surface) |
291 zoomed = pygame.transform.scale(base_surface, | 291 zoomed = pygame.transform.scale(base_surface, |
292 (constants.zoom * constants.screen[0], | 292 (constants.zoom * base_surface.get_width(), |
293 constants.zoom * constants.screen[1])) | 293 constants.zoom * base_surface.get_height())) |
294 area = pygame.rect.Rect(self.zoom_offset[0], self.zoom_offset[1], | 294 area = pygame.rect.Rect(self.zoom_offset[0], self.zoom_offset[1], |
295 self.zoom_offset[0] + constants.screen[0], | 295 self.zoom_offset[0] + constants.screen[0], |
296 self.zoom_offset[1] + constants.screen[1]) | 296 self.zoom_offset[1] + constants.screen[1]) |
297 surface.blit(zoomed, (0, 0), area) | 297 surface.blit(zoomed, (0, 0), area) |
298 else: | 298 else: |