[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Fast Blit with mask



I need to have 3 surfaces.
A is the main image
B is the mask. This would be a round hole that moves around like
looking through a gun sight on a surface the same size as A.
C would be the screen surface.

In the past I would have B surface be all black and the circle be
white and then AND it with the A surface as I blit it to the screen
within the area the size of a rect of the circle.

How is this best done in pygame?
I have tried many ways but all of it is to slow. It should be simple
to define a rect the size of the circle and AND blit it to the
surface.

Thanks for any help!!

Douglas AKA magick on IRC or magick.crow on the docs.