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

Update docs of Surface.get_(f)rect() and (F)Rect.move_to() #2901

Merged
Merged
Show file tree
Hide file tree
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
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
8 changes: 5 additions & 3 deletions docs/reST/ref/surface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -754,22 +754,24 @@
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 ##

.. method:: get_frect

| :sl:`get the rectangular area of the Surface`
| :sg:`get_frect(\**kwargs) -> FRect`

This is the same as :meth:`Surface.get_rect` but returns an FRect. FRect is similar
to Rect, except it stores float values instead.

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