Skip to content

Commit

Permalink
Merge pull request #2901 from Damus666/get_rect-move_to-docs-update
Browse files Browse the repository at this point in the history
Update docs of `Surface.get_(f)rect()` and `(F)Rect.move_to()`
  • Loading branch information
ankith26 authored Jun 3, 2024
2 parents 2adb380 + 23dbfd2 commit 70898d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions docs/reST/ref/rect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@

| :sl:`moves the rectangle to the specified position`
| :sg:`move_to(**kwargs) -> Rect`
Returns a new rectangle that is moved to the given position. You must provide keyword
arguments to the method such as ``center``, ``left``, ``midbottom`` that correspond
to the rectangle's attributes and the method will return a new rectangle whose specified
attributes are set to the given value.
Returns a new rectangle that is moved to the given position and optionally resized.
You must provide keyword arguments to the method such as ``center``, ``left``,
``midbottom``, ``size`` that correspond to the rectangle's attributes and the
method will return a new rectangle whose specified attributes are set to the given value.

It is similar to :meth:`Surface.get_rect` but instead of a calling it as a surface method
you call it as a rectangle method.

Expand Down
6 changes: 4 additions & 2 deletions docs/reST/ref/surface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,8 @@
You can pass keyword argument values to this function. These named values
will be applied to the attributes of the Rect before it is returned. An
example would be ``mysurf.get_rect(center=(100, 100))`` to create a
rectangle for the Surface centered at a given position.
rectangle for the Surface centered at a given position. Size attributes
such as ``size`` or ``w`` can also be applied to resize the Rect.

.. ## Surface.get_rect ##
Expand All @@ -769,7 +770,8 @@
You can pass keyword argument values to this function. These named values
will be applied to the attributes of the FRect before it is returned. An
example would be ``mysurf.get_frect(center=(100.5, 100.5))`` to create a
rectangle for the Surface centered at a given position.
rectangle for the Surface centered at a given position. Size attributes
such as ``size`` or ``w`` can also be applied to resize the FRect.

.. ## Surface.get_frect ##
Expand Down

0 comments on commit 70898d9

Please sign in to comment.