summaryrefslogtreecommitdiff
path: root/gdk/gdkpango.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@src.gnome.org>2005-04-08 17:21:09 +0000
committerCarl Worth <cworth@src.gnome.org>2005-04-08 17:21:09 +0000
commit3d9f1d157a14ef3432c06791d63df1cfaa36ab4b (patch)
tree231f7b99adee874829381226c51c36bf6ff0a41d /gdk/gdkpango.c
parent3962c1166f54cb2c9f83de43cb75f82963ee70ef (diff)
downloadgdk-pixbuf-3d9f1d157a14ef3432c06791d63df1cfaa36ab4b.tar.gz
Simplify matrix manipulation now that cairo exposes the cairo_matrix_t
* gdk/gdkpango.c: (emboss_context): Simplify matrix manipulation now that cairo exposes the cairo_matrix_t structure. * gdk/gdkpixbuf-render.c: (gdk_pixbuf_set_as_cairo_source): Track cairo API change in signedness of data argument.
Diffstat (limited to 'gdk/gdkpango.c')
-rw-r--r--gdk/gdkpango.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c
index 4f26ab70d..1fe43e707 100644
--- a/gdk/gdkpango.c
+++ b/gdk/gdkpango.c
@@ -118,18 +118,16 @@ gdk_pango_renderer_constructor (GType type,
static void
emboss_context (cairo_t *cr)
{
- cairo_matrix_t *tmp_matrix = cairo_matrix_create ();
- double a, b, c, d, tx, ty;
+ cairo_matrix_t tmp_matrix;
/* The gymnastics here to adjust the matrix are because we want
* to offset by +1,+1 in device-space, not in user-space,
* so we can't just draw the layout at x + 1, y + 1
*/
- cairo_get_matrix (cr, tmp_matrix);
- cairo_matrix_get_affine (tmp_matrix, &a, &b, &c, &d, &tx, &ty);
- cairo_matrix_set_affine (tmp_matrix, a, b, c, d, tx + 1, ty + 1);
- cairo_set_matrix (cr, tmp_matrix);
- cairo_matrix_destroy (tmp_matrix);
+ cairo_get_matrix (cr, &tmp_matrix);
+ tmp_matrix.x0 += 1.0;
+ tmp_matrix.y0 += 1.0;
+ cairo_set_matrix (cr, &tmp_matrix);
cairo_set_rgb_color (cr, 1.0, 1.0, 1.0);
}