'In PyCairo, can you clip a Surface using another Surface's transparency layer?

So I've done a bit of googling and looking at older threads here but I still have no idea how to do it. I've seen some other ways to clip Surfaces with drawn paths like in the context.clip method, but I haven't seen anything like it for two surfaces.

The thing I'd want is some way to draw some surface A to sone surface B in the places determined by some other surface C's alpha layer. I'm pretty new to PyCairo so I'd appreciate the help :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source