Skip to content

Commit 70898d9

Browse files
authored
Merge pull request #2901 from Damus666/get_rect-move_to-docs-update
Update docs of `Surface.get_(f)rect()` and `(F)Rect.move_to()`
2 parents 2adb380 + 23dbfd2 commit 70898d9

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/reST/ref/rect.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@
127127

128128
| :sl:`moves the rectangle to the specified position`
129129
| :sg:`move_to(**kwargs) -> Rect`
130-
131-
Returns a new rectangle that is moved to the given position. You must provide keyword
132-
arguments to the method such as ``center``, ``left``, ``midbottom`` that correspond
133-
to the rectangle's attributes and the method will return a new rectangle whose specified
134-
attributes are set to the given value.
135-
130+
131+
Returns a new rectangle that is moved to the given position and optionally resized.
132+
You must provide keyword arguments to the method such as ``center``, ``left``,
133+
``midbottom``, ``size`` that correspond to the rectangle's attributes and the
134+
method will return a new rectangle whose specified attributes are set to the given value.
135+
136136
It is similar to :meth:`Surface.get_rect` but instead of a calling it as a surface method
137137
you call it as a rectangle method.
138138

docs/reST/ref/surface.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,8 @@
754754
You can pass keyword argument values to this function. These named values
755755
will be applied to the attributes of the Rect before it is returned. An
756756
example would be ``mysurf.get_rect(center=(100, 100))`` to create a
757-
rectangle for the Surface centered at a given position.
757+
rectangle for the Surface centered at a given position. Size attributes
758+
such as ``size`` or ``w`` can also be applied to resize the Rect.
758759

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

774776
.. ## Surface.get_frect ##
775777

0 commit comments

Comments
 (0)