Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to rotate image in pygame

# first argument is the original_image
# second one is the angle by how much angle you want you image to be rotated
# third is the zoom amount here it is set to 1 because we don't need to zomm in or out

img_rotated = pygame.transform.rotozoom(original_image,angle,1)

# NOTE: you can use the pygame.transform.rotate but some times rotozoom works better
#** -*= Happy Coding /=*- **#

Ninja Hatori Cat Codr (https://github.com/PrathameshBhatkar)
                      (https://www.youtube.com/channel/UCHzOI93T5ZZ4TqYJqz6WmYQ)
 
PREVIOUS NEXT
Tagged: #rotate #image #pygame
ADD COMMENT
Topic
Name
3+9 =