Skip to content

Commit af3fa86

Browse files
committed
update and clarify the documentation
1 parent 6f03c0a commit af3fa86

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/reST/ref/mask.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,10 @@ to store which parts collide.
613613
:param area: (optional) rectangular portion of the mask to draw. It can be a
614614
rect-like object (a Rect, a tuple or a list with 4 numbers or an object with a
615615
rect attribute, etc) or it can be None (the default) in which case it will use the
616-
entire mask. Just like with Surface.blit, if the rect's topleft is negative
617-
the final destination will be ``dest - rect.topleft``.
616+
entire mask. If the given rect pertrudes outside the bounds of the mask (as returned
617+
by :meth:`get_rect`), it will get clipped to fit those boundaries. If the final rect
618+
is smaller than the mask and no destination ``surface`` is given, the returned surface
619+
will have the same size as this final rect.
618620
:type area: Rect or rect-like object
619621

620622
:returns: the ``surface`` parameter (or a newly created surface if no

0 commit comments

Comments
 (0)