Gtk2 to Gtk3 question - how to use cairo_surface_t

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

 



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
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux