Skip to content

Allow passing special_flags to Group.draw #3306

@MarcellPerger1

Description

@MarcellPerger1

Description
Add a special_flags argument to Group.draw (and all the other group classes).
This would be useful as with this feature, I could write code like this:

group.draw(surface, special_flags=pygame.BLEND_RGBA_MAX)

instead of

for s in group.sprites():
    surface.blit(s.image, s.rect, special_flags=pygame.BLEND_RGBA_MAX)

Also, for more complicated group classes (eg. RenderUpdates), you have to copy the entire code of the .draw functions and change just the line where the .blit method is called which is quite annoying.

See pygame/pygame#3719 for the issue I opened over there (before I found pygame-ce).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions