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

Method clip_surfaces

PythonAPI/examples/no_rendering_mode.py:1246–1250  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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"""

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected