Is there a single way to use images in pygame?

Asked

Viewed 348 times

1

I read in the documentation that the method exists image.load to read images, but it returns an object of the type Surface which is not always the most appropriate, so I wanted to know if there is a way to return an object of the type Rect. And I also wanted to know how to use an image of a Star in pygame?

  • It is possible to write a great answer to this question, but my knowledge of Pygame is limited. Maybe some of this documentation can help you: https://www.pygame.org/docs/ref/sprite.html

1 answer

1

Hello all right? I believe what you are looking for is the get_rect() method. All surfaces have it, just use this image you have uploaded.

Example: image.get_rect().

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.