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

Re: [pygame] Unexpect blit behavior when using BLEND_ADD



Greg Ewing wrote:
Lenard Lindstrom wrote:
This means inlined blending code will have to be replaced with indirect function calls. Otherwise, with all the possible permutations of blending, alphablit.c will balloon in size uncontrollably.

You could make two passes over the surface, one to
update the RGB and one to update the alpha.

Or you could have a set of blending operations that
update the alpha only, and let the user make two
blit calls.

Having a separate blit_alpha might be the way to go. This may actually remove intermediary steps involving an alpha-only surface. Also, it can be abstracted into a general purpose color plane toolkit. While PixelArray is good at carving up a surface it doesn't replace Numeric or NumPy for doing blanket operations on a surface's contents.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>