In this article, we are going to see how images can be flipped using Pygame.
To flip the image we need to use pygame.transform.flip(Surface, xbool, ybool) method which is called to flip the image in vertical direction or horizontal direction according to our needs.
pygame.transform.flip(Surface, xbool, ybool)
Flip the image in vertical direction
In this, we have to flip the image in a vertical direction. We will use pygame.transform.flip() to display the image in vertical. Pass xbool as True and ybool as False, so that the image is flipped vertically.
Please Login to comment...