Skip to content
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

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

datapythonista
Copy link
Contributor

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.

@datapythonista datapythonista requested a review from a team as a code owner September 23, 2024 04:37
Copy link
Member

@ankith26 ankith26 left a 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! 🎈

@ankith26 ankith26 added this to the 2.5.2 milestone Sep 23, 2024
@@ -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
Copy link
Contributor

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.

@yunline yunline added the docs label Sep 25, 2024
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.
@MyreMylar
Copy link
Member

I slightly tweaked the updated wording to hopefully more clearly express what rects are and the multiple ways to position blits.

Copy link
Contributor

@bilhox bilhox left a 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!

@bilhox bilhox merged commit 3076513 into pygame-community:main Oct 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants