-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add special_flags
to Group.draw()
#3321
base: main
Are you sure you want to change the base?
Add special_flags
to Group.draw()
#3321
Conversation
I haven't added the `versionchanged` because I don't know if the next version will be 2.5.3 or 2.6.0
2.5.4, as of today :) |
docs/reST/ref/sprite.rst
Outdated
@@ -551,10 +555,11 @@ Sprites are not thread safe. So lock them yourself if using threads. | |||
.. method:: draw | |||
|
|||
| :sl:`draw all sprites in the right order onto the passed surface.` | |||
| :sg:`draw(surface, bgd=None) -> Rect_list` | |||
| :sg:`draw(surface, bgsurf=None, special_flags=0) -> Rect_list` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
special_flags
should default to None
.
The feature is nice, but the implementation looks strange (it can't be changed though, for |
The only reason I changed it here is for compatibility with |
I agree. |
Add
special_flags
toGroup.draw()
, fixes #3306.I implemented this in the same way as in pygame/pygame#3722 for compatibility with pygame/pygame:
bgsurf
as a (sometimes unused) 2nd argument to to all theGroup.draw()
methods so thatspecial_flags
is consistently the 3rd argument across all subclasses.LayeredUpdates.draw()
,special_flags
(if provided as non-None
) overrides theblendmode
of sprites.In the docs, I haven't added the
versionchanged
because I don't know if the next version (or version where this will be merged) will be2.5.3
or2.6.0
.I haven't used
fblits
in this PR as I thought it might be better to do that in separate PR (let me know if I should do it in this PR)