summaryrefslogtreecommitdiff
path: root/gdk/gdkdraw.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2005-05-07 18:51:18 +0000
committerOwen Taylor <otaylor@src.gnome.org>2005-05-07 18:51:18 +0000
commit274e49f37e16830d4eed74092653062d67ae78cd (patch)
treecec385199452bc0f0c5ec41d962eaca5015dd495 /gdk/gdkdraw.c
parent778b99a403c1a69e33f96cd140666fe7278195e5 (diff)
downloadgdk-pixbuf-274e49f37e16830d4eed74092653062d67ae78cd.tar.gz
Change prototype to match cairo_set_source_surface().
2005-05-07 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixbuf-render.c gdk/gdkpixbuf.h (gdk_pixbuf_set_as_cairo_source): Change prototype to match cairo_set_source_surface(). * gdk/gdkdraw.c gdk/gdkgc.c gdk/gdkpixbuf-render.c gdk/gdkwindow.c gtk/gtkhsv.c tests/testcairo.c.
Diffstat (limited to 'gdk/gdkdraw.c')
-rw-r--r--gdk/gdkdraw.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index ca0950d2c..3269668b1 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -884,16 +884,16 @@ real_draw_glyphs (GdkDrawable *drawable,
if (matrix)
{
- cairo_matrix_t *cairo_matrix;
-
- cairo_matrix = cairo_matrix_create ();
- cairo_matrix_set_affine (cairo_matrix,
- matrix->xx, matrix->yx,
- matrix->xy, matrix->yy,
- matrix->x0, matrix->y0);
+ cairo_matrix_t cairo_matrix;
+
+ cairo_matrix.xx = matrix->xx;
+ cairo_matrix.yx = matrix->yx;
+ cairo_matrix.xy = matrix->xy;
+ cairo_matrix.yy = matrix->yy;
+ cairo_matrix.x0 = matrix->x0;
+ cairo_matrix.y0 = matrix->y0;
- cairo_set_matrix (cr, cairo_matrix);
- cairo_matrix_destroy (cairo_matrix);
+ cairo_set_matrix (cr, &cairo_matrix);
}
cairo_move_to (cr, x, y);
@@ -1304,11 +1304,9 @@ gdk_drawable_create_cairo_context (GdkDrawable *drawable)
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
- cr = cairo_create ();
-
surface = _gdk_drawable_ref_cairo_surface (drawable);
- if (surface)
- cairo_set_target_surface (cr, surface);
+ cr = cairo_create (surface);
+ cairo_surface_destroy (surface);
return cr;
}