Changeset 432:ed5ba04d553c


Ignore:
Timestamp:
09/07/13 11:52:34 (8 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
33366135393337333364393735313466393133636636376631643933653563343839313062373338
Message:

avoid some work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/area_editor.py

    r426 r432  
    151151                         self.point_to_pygame(endpoint)]
    152152            pygame.draw.lines(self._surface, LINE_COLOR, False, pointlist, 1)
    153         return self._surface.copy()
     153        return self._surface
    154154
    155155    def reset_objs(self):
     
    483483        surface_area = pygame.rect.Rect(self.pos, SCREEN)
    484484        zoomed_surface = level_surface.copy()
    485         zoomed_surface = pygame.transform.scale(
    486             level_surface,
    487             (int(level_surface.get_width() / self._zoom_factor),
    488              int(level_surface.get_height() / self._zoom_factor)))
     485        if self._zoom_factor != 1:
     486            zoomed_surface = pygame.transform.scale(
     487                level_surface,
     488               (int(level_surface.get_width() / self._zoom_factor),
     489                int(level_surface.get_height() / self._zoom_factor)))
    489490        surface.blit(zoomed_surface, (0, 0), surface_area)
    490491
Note: See TracChangeset for help on using the changeset viewer.