[cairo] cairo and gdk/X11

Xan xan.lopez at gmail.com
Sun Jun 10 05:48:40 PDT 2007

On 6/10/07, Tamas K Papp <tpapp at princeton.edu> wrote:
> On Wed, Jun 06, 2007 at 07:56:40PM -0700, Dan Amelang wrote:
> This thread [1] suggests that I create a GdkPixmap, use
> gtk_cairo_create(GdkPixmap*) to create a Cairo surface, then copy with
> gdk_draw_drawable().  But it appears that GdkPixmap is deprecated. [2]

Note that what is deprecated is GtkPixmap, not GdkPixmap, they are
different things. Using GdkPixmap is perfectly ok.

> What would be the recommended way to implement this `double-buffering'
> in the current Gtk?  Is there perhaps some widget that could take care
> of double buffering and provide a Cairo surface?

GtkDrawingArea, although I'm not sure what are you trying to do. AFAIK
all drawing in GTK+ is double buffered nowadays and you can create a
cairo surface to draw on any GdkDrawable with gdk_cairo_create.

Hope this helps :)

Cheers, Xan

> Thanks,
> Tamas
> [1] http://permalink.gmane.org/gmane.comp.lib.cairo/5468
> [2] http://www.gtk.org/api/2.6/gtk/GtkPixmap.html
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo

More information about the cairo mailing list