Skip to content

Not using enums in blend modes #153

@tgrajewski

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions