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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/reST/tutorials/en/intro-to-pygame.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ returns us a Surface with the ball data. The Surface will keep any
colorkey or alpha transparency from the file. After loading the ball
image we create a variable named ballrect. Pygame comes with a
convenient utility object type named :class:`Rect <pygame.Rect>`,
which represents a rectangular area. Later, in the animation part of
the code, we will see what the *Rect* objects can do.
which represents a rectangular area (which can be used to manage the position of an
object in the screen).

At this point, :clr:`line 13`,
our program is initialized and ready to run. Inside an infinite loop we
Expand Down Expand Up @@ -152,7 +152,7 @@ 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 position (which can be a :class:`Rect <pygame.Rect>` object or a pair of numbers e.g. (50.0, 25.0)), to place the source onto the destination.

The last thing we need to do is actually update the visible display.
Pygame manages the display with a double buffer. When we are finished
Expand Down