[pygame]how to copy a surface to an other surface with alpha value?

F

flyaflya

I want to join some surfaces to a new big surface with alpha cannel, I want
the new surface has same pixels(inclue r,g,b and alpha value) as the pixels
on the source surfaces.
my code as follow:

surf = pygame.Surface((200,200))
surf.blit(surf1, (0,0))
surf.blit(surf2, (0,100))
......

but these codes can't copy alpha value to the new surface.how can I deal
with it?
 
D

Devan L

flyaflya said:
I want to join some surfaces to a new big surface with alpha cannel, I want
the new surface has same pixels(inclue r,g,b and alpha value) as the pixels
on the source surfaces.
my code as follow:

surf = pygame.Surface((200,200))
surf.blit(surf1, (0,0))
surf.blit(surf2, (0,100))
.....

but these codes can't copy alpha value to the new surface.how can I deal
with it?

Try the pygame mailing list or irc channel.
http://www.pygame.org/info.shtml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top