[cairo] changing alpha in herds

Donn donn.ingle at gmail.com
Mon Nov 5 12:50:36 PST 2007


Hi again,
In my random quest to draw things from a stack, I am wondering how best to 
tackle this:

class BigSquare(Shape):
    def draw(self):
        self.context.set_source_rgba(0, 1, 1,1)
        self.context.rectangle(0, 00, 250, 250)
        self.context.fill()

What can I do on either side of BigSquare (like one does with transform and 
co.) to affect the alpha value?
Assume BigSquare can have any kind of content, let's say a stroke and another 
square within it.

I'm aiming for:
<some voodoo alpha = 0.5>
BigSquare.draw()
<end voodoo>

If that makes any sense :)

Stay tuned for "masking herds" coming to a list near you!
\d


More information about the cairo mailing list