Skip to content

Not using enums in blend modes #153

Description

@tgrajewski

There are two enums defined in the graphics module, but they aren't used in the BlendMode class:

class Factor(IntEnum):
    ...
class Equation(IntEnum):
    ...

The BlendMode class has various properties, that should give values from the above enums and not regular numbers:

BlendMode.color_dst_factor
BlendMode.color_equation
BlendMode.alpha_src_factor
BlendMode.alpha_dst_factor
BlendMode.alpha_equation

This would improve readability, because enums have the name property (using it in the BlendMode.__repr__() would be great too).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions