summaryrefslogtreecommitdiff
path: root/gdk/gdkdraw.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2005-02-03 23:29:02 +0000
committerOwen Taylor <otaylor@src.gnome.org>2005-02-03 23:29:02 +0000
commit93344f6dfee0d21e5e9aa750b5a91ed10980cd24 (patch)
tree71978aa4f489edd13c2d71b55344921f0fdaab5b /gdk/gdkdraw.c
parent8a5d05e253490a5851b7e142f4090971153c1178 (diff)
downloadgdk-pixbuf-93344f6dfee0d21e5e9aa750b5a91ed10980cd24.tar.gz
Add gdk_drawable_set_cairo_target().
2005-02-03 Owen Taylor <otaylor@redhat.com> * gdk/gdkdrawable.[ch] gdkpixmap.c gdkwindow.c: Add gdk_drawable_set_cairo_target(). * tests/testtreeflow.c (enum): Use grand not rand as a variable name because one of the cairo headers is pulling in stdlib.h. * tests/testcairo.c tests/Makefile.am: Add a simple cairo based example. * configure.in: Bump release to 2.7.0, gtk_binary_version to 2.7.0. * Require libpangocairo for all backends.
Diffstat (limited to 'gdk/gdkdraw.c')
-rw-r--r--gdk/gdkdraw.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index f547fad90..63951a024 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -1221,6 +1221,29 @@ gdk_drawable_real_get_visible_region (GdkDrawable *drawable)
return gdk_region_rectangle (&rect);
}
+/**
+ * gdk_drawable_set_cairo_target:
+ * @drawable: a #GdkDrawable
+ * @cr: a cairo context
+ *
+ * Sets the given drawable as the target surface for a Cairo context.
+ * Note that when @drawable is a window and gdk_window_begin_paint()
+ * has been called, the target surface will be set to the temporary
+ * backing pixmap, so you can only use the Cairo context until
+ * the matching call to gdk_window_end_paint().
+ *
+ * Since: 2.10
+ **/
+void
+gdk_drawable_set_cairo_target (GdkDrawable *drawable,
+ cairo_t *cr)
+{
+ g_return_if_fail (GDK_IS_DRAWABLE (drawable));
+ g_return_if_fail (cr != NULL);
+
+ return GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_target (drawable, cr);
+}
+
static void
composite (guchar *src_buf,
gint src_rowstride,