Create/resize the pygame window for current rotation.
(self)
| 150 | return 0 |
| 151 | |
| 152 | def _create_window(self): |
| 153 | """Create/resize the pygame window for current rotation.""" |
| 154 | sw = self._w * _SCALE |
| 155 | sh = self._h * _SCALE |
| 156 | self._screen = pygame.display.set_mode((sw, sh)) |
| 157 | self._surface = pygame.Surface((self._w, self._h)) |
| 158 | self._surface.fill((0, 0, 0)) |
| 159 | |
| 160 | # Draw initial frame |
| 161 | scaled = pygame.transform.scale(self._surface, (sw, sh)) |
| 162 | self._screen.blit(scaled, (0, 0)) |
| 163 | pygame.display.flip() |
| 164 | |
| 165 | def cleanup(self): |
| 166 | """Clean up the mock display.""" |
no test coverage detected