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

Re: [pygame] trouble w/ SRCALPHA in 1.9.2-cp27



Here's a workaround for anyone in the same bind, i.e. where the routine handles generic surfaces and therefore needs to inspect them in order to apply the appropriate alpha effect.

1. save the surface alpha
2. set the surface alpha to None
3. test the surface for SRCALPHA
4. if SRCALPHA, do blending for per-pixel alpha
5. restore the surface alpha


On 11/29/2017 4:03 PM, MrGumm wrote:

Nooo... Say it ain't so!


On 11/29/2017 2:16 AM, Thomas Kluyver wrote:
There's not a lot of work happening on pygame right now, so don't expect a new release any time soon. If you can find the fix for your issues, hopefully someone can look at a pull request.

Thomas

On 28 November 2017 at 23:56, MrGumm <stabbingfinger@xxxxxxxxx> wrote:
Greetings,

Developers:

I've submitted issues #340 and #341.
https://bitbucket.org/pygame/pygame/issues/340/surfaceconvert-does-not-remove-the
https://bitbucket.org/pygame/pygame/issues/341/surfaceset_alpha-sets-the-srcalpha-flag

Actually it seems to impact everything from font rendering w/ a background color, to rotozoom, to these tracked issues. Therefore, maybe it'll be a one-tweak-fixes-all.

This problem has major impact on my current project (a gfx-intensive shooter on Raspian), so I'd like to get a feel, if I may, for when the next release may appear with the fix(es) in it?

Fellow coders:

In the meantime, I would consider a workaround. But I cannot find one. If anyone is smarter than me, help would be appreciated. I need to detect whether a surface has per-pixel alpha in order to apply the proper transforms. In the past this was detectable by checking the flags for the presence of SRCALPHA. It's the nature of these issues that this is no longer reliable.

Thanks in advance.