[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Surface.blit() BLEND_ADD vs. BLEND_RGBA_ADD



Hello,

On 15/12/11 11:10 PM, Florian Berger wrote:
Hi!

Ian Mallett<geometrian@xxxxxxxxx>:
Simply call .convert_alpha() on each surface after you make your
window.  This clears up most problems.
I am doing that already. In fact I blit the sprite, so I can see that
alpha works; then I create a Surface.copy(), manipulate that and blit
it over the sprite using BLEND_RGBA_ADD.

The result is that the blit incorporates the RGB values of the fully
transparent pixels and adds them as well, resulting in an ugly square
around the sprite.

The solution in my case is to make sure that the transparent pixels
also have a (0, 0, 0) RGB value. But this is annoying. I think this
calls for a bug report. ;-)

Regards,
	Florian
The behavior of the various blit blend operations has never been properly defined, or documented. If someone could provide a formal definition and use case for each blend operation, they could be made more useful.

Lenard Lindstrom