Used to improve perfomance. Clips the surfaces in order to render only the part of the surfaces that are going to be visible
(self, clipping_rect)
| 1244 | self._render_walkers(surface, walkers, self.map_image.world_to_pixel) |
| 1245 | |
| 1246 | def clip_surfaces(self, clipping_rect): |
| 1247 | """Used to improve perfomance. Clips the surfaces in order to render only the part of the surfaces that are going to be visible""" |
| 1248 | self.actors_surface.set_clip(clipping_rect) |
| 1249 | self.vehicle_id_surface.set_clip(clipping_rect) |
| 1250 | self.result_surface.set_clip(clipping_rect) |
| 1251 | |
| 1252 | def _compute_scale(self, scale_factor): |
| 1253 | """Based on the mouse wheel and mouse position, it will compute the scale and move the map so that it is zoomed in or out based on mouse position""" |