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

Gabriel mystml at adinet.com.uy
Thu Nov 17 08:26:46 PST 2005

El mié, 16-11-2005 a las 23:05 +0100, D. Gyimesi escribió:
> 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 did anyone meet a problem similar
> to this?

No, and assuming you have everything set up correctly, it should work as
you describe it. Are you completely sure that the problem isn't in the
images themselves? If the "strange black belt" is not rectangular and
contains the complete image, I'd say that's the most likely cause.

How do you get SDL_Surfaces with alpha? Load from PNGs or are you doing
something else? Are you messing with the surface flags after loading

Gabriel Gambetta
Mystery Studio - http://www.mysterystudio.com
Gabriel on Graphics - http://gabrielongraphics.blogspot.com

More information about the SDL mailing list