GNOME Bugzilla – Bug 462216
Add gdk_cairo_set_source_drawable()
Last modified: 2010-09-27 04:27:50 UTC
Currently there are the following gdkcairo functions: cairo_t *gdk_cairo_create (GdkDrawable *drawable); void gdk_cairo_set_source_color (cairo_t *cr, GdkColor *color); void gdk_cairo_set_source_pixbuf (cairo_t *cr, GdkPixbuf *pixbuf, double pixbuf_x, double pixbuf_y); void gdk_cairo_set_source_pixmap (cairo_t *cr, GdkPixmap *pixmap, double pixmap_x, double pixmap_y); void gdk_cairo_rectangle (cairo_t *cr, GdkRectangle *rectangle); void gdk_cairo_region (cairo_t *cr, GdkRegion *region); One obviously missing is a function returning a cairo_surface_t for a drawable. That still can be achieved externally by using gdk_cairo_create() and cairo_get_target() on the result. So one way to improve it is to add something like gdk_cairo_create_surface_for_drawable() or something. But I personally don't like that function, for one reason because the drawable is rather temporary. Another way to improve the bindings and reduce the need for that function is to add gdk_cairo_set_source_drawable(). That goes really nice with the other set_source functions already there.
We now have gdk_cairo_set_source_window (and gdk_cairo_set_source_pixmap is gone)