python-sfml icon indicating copy to clipboard operation
python-sfml copied to clipboard

Not using enums in blend modes

Open tgrajewski opened this issue 8 years ago • 0 comments

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

tgrajewski avatar Apr 09 '17 18:04 tgrajewski