Gtk2 to Gtk3 question - how to use cairo_surface_t
- From: Collin Day <dcday137 gmail com>
- To: gtk-list gnome org
- Subject: Gtk2 to Gtk3 question - how to use cairo_surface_t
- Date: Fri, 18 May 2012 11:49:40 -0600
Hi all,
I am converting some code from gtk2 to gtk3. I understand that GdkPixmap is replaced by cairo_surface_t. Acroos the code I am changing, I have a lot of situations like:
GdkPixmap *map;
gtk_image_get_pixmap( GTK_IMAGE(widget), &map, NULL );
.....
draw stuff on map
.....
What I can't seem to figure out from the documentation is how to replace the gtk_image_get_pixmap() function. Would you just use a GdkPixbuf and gtk_image_get_pixbuf() - if so, I can't seem to figure how to go from the pixbuf to the cairo_surface_t. You can just set the cairo context to use the pixbuf directly with gdk_cairo_set_source_pixbuf(), but I am not sure if this is the best/right way.
Sorry for the noobish question, but that is what I am to gtk.
Thanks for your time!
-C
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]