Learn Before
Transform Operations in Pygame
Scaling and Rotating a Surface in Pygame
You can scale and roatate a surface using transform.rotozoom(). This will rotate a surface by a number of degrees, just like transform.rotate(), while also scaling the surface to a certain size, just like transform.scale().
rotozoom(Surface, angle, scale) -> Surface normalSurface = pygame.surface(20, 20) transformedSurface = rotozoom(normalSurface, 90, (100, 100)) #transform the original surface by rotating it 90 degrees and scaling it up to 100x100 pixels
0
1
4 years ago
Tags
Python Programming Language
Data Science
Related
Scale a Surface in Pygame
Flipping a Surface in Pygame
Rotating a Surface in Pygame
Scaling and Rotating a Surface in Pygame