[SDL] blitting from-to surface with per-pixel alpha doesn't work...

D. Gyimesi dgyimesi at gmail.com
Wed Nov 16 11:15:55 PST 2005

Hi there!

I know SDL's problem about blitting with per-pixel alpha surfaces into
each other.

In the pygame (SDL binding for Python) documentation one can find the
'Surface alphas can be mixed with colorkeys, but an image with per pixel
alphas cannot use the other modes.'

I can interpret this like one can blit pixel data from any number of
surfaces to another with "only" one restriction: all of the surfaces'
transparency must be set to per-pixel alpha.

So, my problem is the following:
I have four surfaces: screen, background, tank and its parts.
The order of blitting: screen<-background and in another cycle
screen<-tank<-parts. All surfaces are having per-pixel-data of course.

Despite of this, the result in the tank surface (the surface I blit into
the parts) draws a strange black 'belt' around the parts, but other
transparent areas of the surfaces are showing up well.

I know it's a little hard to imagine, but anyone meet a problem similar
to this?

Thank you, and sorry for my english!

More information about the SDL mailing list