From 8811cd67d3643f5fcdc46ea787ccab8bfbe2cf3c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 17 Oct 2010 14:15:07 +0200 Subject: gnome-canvas: Convert canvas item transformation matrix to cairo Also update the GnomeCanvasItem.update vfunc to take a cairo_matrix_t and no longer pass the clip_path (what was it used for anyway?). --- widgets/table/e-table-header-item.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'widgets/table/e-table-header-item.c') diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index cf4cc9468a..e1c6c57198 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -184,18 +184,15 @@ e_table_header_item_get_height (ETableHeaderItem *ethi) static void ethi_update (GnomeCanvasItem *item, - gdouble *affine, - ArtSVP *clip_path, + const cairo_matrix_t *i2c, gint flags) { ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item); - - gdouble i2c[6]; - ArtPoint c1, c2, i1, i2; + double x1, y1, x2, y2; if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update) GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update ( - item, affine, clip_path, flags); + item, i2c, flags); if (ethi->sort_info) ethi->group_indent_width = @@ -208,27 +205,25 @@ ethi_update (GnomeCanvasItem *item, e_table_header_total_width (ethi->eth) + ethi->group_indent_width; - i1.x = i1.y = 0; - i2.x = ethi->width; - i2.y = ethi->height; + x1 = y1 = 0; + x2 = ethi->width; + y2 = ethi->height; - gnome_canvas_item_i2c_affine (item, i2c); - art_affine_point (&c1, &i1, i2c); - art_affine_point (&c2, &i2, i2c); + gnome_canvas_matrix_transform_rect (i2c, &x1, &y1, &x2, &y2); - if (item->x1 != c1.x || - item->y1 != c1.y || - item->x2 != c2.x || - item->y2 != c2.y) + if (item->x1 != x1 || + item->y1 != y1 || + item->x2 != x2 || + item->y2 != y2) { gnome_canvas_request_redraw ( item->canvas, item->x1, item->y1, item->x2, item->y2); - item->x1 = c1.x; - item->y1 = c1.y; - item->x2 = c2.x; - item->y2 = c2.y; + item->x1 = x1; + item->y1 = y1; + item->x2 = x2; + item->y2 = y2; /* FIXME: Group Child bounds !? (FOO BAA) */ #if 0 gnome_canvas_group_child_bounds (GNOME_CANVAS_GROUP (item->parent), item); -- cgit v1.2.3