How in pygame will reflect the image horizontally, rotate and change the transparency

How to flip an image horizontally in pygame, rotate it, and change the transparency.

I still need to make an atlas and how do I selectively choose what I need from one image.

And so that I don't ask such stupid questions, please throw a guide or something at me.

P.S. I'm a little silly and haven't learned how to Google the right information yet (^◕ ᴥ ◕^)

Author: Kity2891, 2020-03-06

1 answers

Unfortunately, I can only help with reflection and rotation.

Reflection is performed using the pygame.transform.flip(surface, xbool, ybool) command, where surface is the surface for reflection, xbool determines whether horizontal reflection is necessary (True, if so), ybool determines whether vertical reflection is necessary.

Rotate-the pygame.transform.rotate(surface, angle) command, where surface is the surface and angle is the angle of rotation.

The pygame guide is here: https://www.pygame.org/docs. I'll tell you right away, it's on English.

I hope I helped you. May the force be with you ;)

 0
Author: alex9127, 2020-08-20 20:08:20