[evolution/rendering-cleanup] Fix gnome_canvas_item_w2i_matrix().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/rendering-cleanup] Fix gnome_canvas_item_w2i_matrix().
- Date: Thu, 28 Oct 2010 02:47:24 +0000 (UTC)
commit 9d01bfaad775f8a2fe6249b9f5f336039a069dee
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Oct 27 15:52:34 2010 -0400
Fix gnome_canvas_item_w2i_matrix().
Was returning an inverted matrix: i2w instead of w2i.
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 231ad73..d78e620 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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]