What do the blend modes in pygame mean?

后端 未结 2 1066
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-15 10:15

Surface.blit has a new parameter in 1.8: blend. The following values are defined:

  • BLEND_ADD
  • BLEND_SUB
  • BLEND_M
2条回答
  •  温柔的废话
    2020-12-15 10:48

    Those are blending modes for compositing images on top of each other. The name of the blending mode already tells you the underlying operation.

    The BLEND_* constants are simply aliases for the BLEND_RGB_* constants and the BLEND_RGBA_* variants operate on all four channels (including the alpha channel) as opposed to only RGB.

    For general information about the different blending modes and their respective effects, see here.

提交回复
热议问题