-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify how Rect and positions relate in the intro tutorial #3111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for contributing! 🎈
@@ -152,7 +152,8 @@ Drawing of images is handled by the | |||
:meth:`Surface.blit() <pygame.Surface.blit>` method. | |||
A blit basically means copying pixel colors from one image to another. | |||
We pass the blit method a source :class:`Surface <pygame.Surface>` | |||
to copy from, and a position to place the source onto the destination. | |||
to copy from, and a :class:`Rect <pygame.Rect>` object, representing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest here to stay with the old sentence. It feels more logical and intuitive to pass a destination position (which is even more used than Rects based on datas I don't have), rather than making a rect.
to hopefully clarify that while rects can be used as positions, they are not the only way to position and they also have other uses.
I slightly tweaked the updated wording to hopefully more clearly express what rects are and the multiple ways to position blits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now! Thanks for the contribution!
The introduction to PyGame tutorial is a bit confusing for very beginners about the
Rect
object.I think for beginners talking about a rectangular area it sounds like a rectangle will be printed on the screen. I think it's better to be more specific and mention that rectangular areas are the way to manage an object position.