Re: cairo surface from GdkPixmap



> Unfortunately this won't work for me. gdk_cairo_create() creates a Cairo surface, then it creates a Cairo context from this surface, and then it destroys the Cairo surface.  What I am looking for is a function that creates a Cairo surface and returns it directly. Then I can use pycairo to create a Cairo context from the Cairo surface, which allows me to subclass the Cairo context. The gtk function _gdk_drawable_ref_cairo_surface does exactly what I want, however this is a private function.

The surface isn't destroyed, it's un-reffed. You can still get the
surface from the context using cairo's get_target() method, and then
do with the surface as you please.


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