diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-28 03:52:34 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-30 01:51:38 +0800 |
commit | 65b1049d7028a3394961f6d4fe4418e6cdef6053 (patch) | |
tree | 51d829e065a5fb9c1d242839bb83170757834fc6 /libgnomecanvas | |
parent | 952ae5caec013fb41fa2bc228c3681ae2c35f63e (diff) | |
download | gsoc2013-evolution-65b1049d7028a3394961f6d4fe4418e6cdef6053.tar.gz gsoc2013-evolution-65b1049d7028a3394961f6d4fe4418e6cdef6053.tar.zst gsoc2013-evolution-65b1049d7028a3394961f6d4fe4418e6cdef6053.zip |
Fix gnome_canvas_item_w2i_matrix().
Was returning an inverted matrix: i2w instead of w2i.
Diffstat (limited to 'libgnomecanvas')
-rw-r--r-- | libgnomecanvas/gnome-canvas.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c index 92cd664a96..26d853e8a4 100644 --- a/libgnomecanvas/gnome-canvas.c +++ b/libgnomecanvas/gnome-canvas.c @@ -923,15 +923,14 @@ gnome_canvas_item_i2w_matrix (GnomeCanvasItem *item, cairo_matrix_t *matrix) void gnome_canvas_item_w2i_matrix (GnomeCanvasItem *item, cairo_matrix_t *matrix) { + cairo_status_t status; + g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); g_return_if_fail (matrix != NULL); - cairo_matrix_init_identity (matrix); - - while (item) { - cairo_matrix_multiply (matrix, &item->matrix, matrix); - item = item->parent; - } + gnome_canvas_item_i2w_matrix (item, matrix); + status = cairo_matrix_invert (matrix); + g_return_if_fail (status == CAIRO_STATUS_SUCCESS); } /** |