[cairo] gtk, cairo, surfaces and alpha

Gerdus van Zyl gerdusvanzyl at gmail.com
Sat May 23 05:55:28 PDT 2009

Don't think that's possible, since get_target gets the surface gtk
creates in the background which doesn't have alpha. In that case I
can't think of any other solution than to render to your own image

On Sat, May 23, 2009 at 1:46 PM, Donn <donn.ingle at gmail.com> wrote:
>> tsurf = ctx.get_target() #get surface from context
>> tsurf.write_to_png("screen.png")
> This is great. One wrinkle: Is there any way to get alpha written out to the
> PNG? I would like transparent areas in the output -- in the window they would
> show as grey (the default window colour).
> \d
> --
> home: http://otherwise.relics.co.za/
> https://savannah.nongnu.org/projects/things/
> https://savannah.nongnu.org/projects/fontypython/
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo

More information about the cairo mailing list