Mercurial > boomslang
comparison pyntnclick/tools/rect_drawer.py @ 811:a0fd258cd5d7 pyntnclick
Correctly crop zoomed image
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 27 Jan 2013 16:49:53 +0200 |
parents | 9968778115ce |
children | 2dd400a7c16d |
comparison
equal
deleted
inserted
replaced
810:6f38e20b1417 | 811:a0fd258cd5d7 |
---|---|
307 self.do_unzoomed_draw(base_surface) | 307 self.do_unzoomed_draw(base_surface) |
308 zoomed = pygame.transform.scale(base_surface, | 308 zoomed = pygame.transform.scale(base_surface, |
309 (constants.zoom * base_surface.get_width(), | 309 (constants.zoom * base_surface.get_width(), |
310 constants.zoom * base_surface.get_height())) | 310 constants.zoom * base_surface.get_height())) |
311 area = pygame.rect.Rect(self.zoom_offset[0], self.zoom_offset[1], | 311 area = pygame.rect.Rect(self.zoom_offset[0], self.zoom_offset[1], |
312 self.zoom_offset[0] + constants.screen[0], | 312 constants.screen[0], constants.screen[1]) |
313 self.zoom_offset[1] + constants.screen[1]) | |
314 surface.blit(zoomed, (0, 0), area) | 313 surface.blit(zoomed, (0, 0), area) |
315 else: | 314 else: |
316 self.do_unzoomed_draw(surface) | 315 self.do_unzoomed_draw(surface) |
317 | 316 |
318 def do_unzoomed_draw(self, surface): | 317 def do_unzoomed_draw(self, surface): |