MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / scale_map

Method scale_map

PythonAPI/examples/no_rendering_mode.py:870–875  ·  view source on GitHub ↗

Scales the map surface

(self, scale)

Source from the content-addressed store, hash-verified

868 return int(self.scale * self._pixels_per_meter * width)
869
870 def scale_map(self, scale):
871 """Scales the map surface"""
872 if scale != self.scale:
873 self.scale = scale
874 width = int(self.big_map_surface.get_width() * self.scale)
875 self.surface = pygame.transform.smoothscale(self.big_map_surface, (width, width))
876
877
878class World(object):

Callers 1

_compute_scaleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected