aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas/gnome-canvas.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgnomecanvas/gnome-canvas.c')
-rw-r--r--libgnomecanvas/gnome-canvas.c11
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);
}
/**