I have 2 different images A and B, B is blit on top of A. I'd like to have (blit I guess) a hole in B that lets me see A through it. Can anyone help me with that? Thanks in advance.
            Asked
            
        
        
            Active
            
        
            Viewed 315 times
        
    1 Answers
2
            
            
        You can set make a hole in B before blitting it above A, using a color key (see https://www.pygame.org/docs/ref/surface.html#pygame.Surface.set_colorkey)
- pick a color K not used in B
 - fill the "hole" in B with this color
 - set the color key of B to K
 - blit A
 - blit B
 
Instead of a color key you also can use alpha transparency.
        thejonny
        
- 488
 - 2
 - 9
 
- 
                    you have to fill it by this color – thejonny Feb 26 '21 at 17:02
 - 
                    clear, thanks a lot. – ToeTeo Feb 26 '21 at 17:04