Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-15 Thread René Dudfield
This is completely amazing work!

Thanks a lot Sean.

Now I have to do the renderer, so it renders it to html for the website
(plus syntax highlighting, and adding the menu).  I've got most of the code
for this already, just need to finish it off.


cheers,


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

2011-12-15 Thread Florian Berger
Hi,

I am toying around with the above blitting flags. I am blitting a RGBA
sprite surrounded by transparent (i.e. alpha) pixels on a solid RGBA
surface (at least I suppose it is so, both are created from RGBA PNG
images).

In my test setup, there is no difference between BLEND_ADD and
BLEND_RGBA_ADD. I hoped that the latter would honor alpha transparency,
and not add color values of transparent pixels, but this seems not to
be the case. :-/

Has anyone played with this? What is the difference between these two
supposed to be?

Thanks!
Florian


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

2011-12-15 Thread Ian Mallett
On Thu, Dec 15, 2011 at 3:18 PM, Florian Berger
fber...@florian-berger.dewrote:

 Hi,

 I am toying around with the above blitting flags. I am blitting a RGBA
 sprite surrounded by transparent (i.e. alpha) pixels on a solid RGBA
 surface (at least I suppose it is so, both are created from RGBA PNG
 images).

 In my test setup, there is no difference between BLEND_ADD and
 BLEND_RGBA_ADD. I hoped that the latter would honor alpha transparency,
 and not add color values of transparent pixels, but this seems not to
 be the case. :-/

 Has anyone played with this? What is the difference between these two
 supposed to be?

 Thanks!
 Florian

Hi,

I've never successfully gotten the blit flags to work *exactly* as I'd
like.  If you want perfect control, use the blending modes inherent in a
graphics API like OpenGL.

In PyGame, the most reliable way I've found to do this is to ensure that
the surfaces actually do have alpha channels.  Simply call .convert_alpha()
on each surface after you make your window.  This clears up most problems.

Ian