How Can I Rotate An Image In Pygame With Out Current Command(with Out *pygame.transform.rotate* Command)?
import pygame SIZE = 1000, 900 pygame.init() screen = pygame.display.set_mode(SIZE) a=0 done = False screen.fill((0, 0, 0)) other1 = pygame.image.load('
Solution 1:
One liners using numpy:
Clockwise
pygame.surfarray.make_surface(numpy.rot90(pygame.surfarray.array2d(other1)))
Counter-clockwise
pygame.surfarray.make_surface(numpy.rot90(pygame.surfarray.array2d(other1), 3))
Post a Comment for "How Can I Rotate An Image In Pygame With Out Current Command(with Out *pygame.transform.rotate* Command)?"