Renders all the actors
(self, surface, vehicles, traffic_lights, speed_limits, walkers)
| 1233 | pygame.draw.lines(surface, color, False, corners, int(math.ceil(4.0 * self.map_image.scale))) |
| 1234 | |
| 1235 | def render_actors(self, surface, vehicles, traffic_lights, speed_limits, walkers): |
| 1236 | """Renders all the actors""" |
| 1237 | # Static actors |
| 1238 | self._render_traffic_lights(surface, [tl[0] for tl in traffic_lights], self.map_image.world_to_pixel) |
| 1239 | self._render_speed_limits(surface, [sl[0] for sl in speed_limits], self.map_image.world_to_pixel, |
| 1240 | self.map_image.world_to_pixel_width) |
| 1241 | |
| 1242 | # Dynamic actors |
| 1243 | self._render_vehicles(surface, vehicles, self.map_image.world_to_pixel) |
| 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""" |
no test coverage detected