GtkSharp / GtkSharp

.NET wrapper for Gtk and other related libraries
Other
891 stars 98 forks source link

no bindings for gdk_cairo_surface_create_from_pixbuf / gdk_pixbuf_get_from_surface #347

Closed medovina closed 2 years ago

medovina commented 2 years ago

GDK includes two useful functions to convert between GDK pixbufs and Cairo surfaces:

Unfortunately it appears that these are not exposed in GtkSharp.

cameronwhite commented 2 years ago

gdk_pixbuf_get_from_surface should be available as a constructor on Gdk.Pixbuf (this was added in #176) I think gdk_cairo_surface_create_from_pixbuf is available as Gdk.CairoHelper.SurfaceCreateFromPixbuf() based on https://github.com/GtkSharp/GtkSharp/blob/451755439e50411ac383717884d53bf43c7b2bdb/Source/Libs/GdkSharp/GdkSharp-api.xml#L4533

medovina commented 2 years ago

Aha - I had not discovered those methods. Great, thanks!