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

[pygame] Setting alpha with a blit?



I have a surface to which I want to add hex shaped transparent holes, with
the aim of creating a "frame" that I can blit onto a hex map to mask
anything outside the hexes.

As a first attempt I've just iterated through all the pixels and set them
transparent as appropriate.  This is a bit slow however, and what I'd really
like is to somehow "blit" transparency onto a surface, setting the
underlying pixel values rather than modifying them.

Is there some api or trick for doing this?

-Jasper