[evolution/foocanvas: 4/4] Adapt to API changes between GnomeCanvas and FooCanvas.



commit 914125d0820b36b06022bf24acd1d93407fde3a6
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Aug 13 22:48:30 2009 -0400

    Adapt to API changes between GnomeCanvas and FooCanvas.

 addressbook/gui/widgets/e-minicard-label.c |    8 ++-
 addressbook/gui/widgets/e-minicard.c       |   15 ++++---
 calendar/gui/e-day-view-main-item.c        |   19 +++++---
 calendar/gui/e-day-view-time-item.c        |   25 ++++++-----
 calendar/gui/e-day-view-top-item.c         |   17 ++++---
 calendar/gui/e-day-view.c                  |   20 ++++----
 calendar/gui/e-meeting-time-sel-item.c     |   20 ++++++---
 calendar/gui/e-week-view-event-item.c      |   17 ++++---
 calendar/gui/e-week-view-main-item.c       |   17 ++++---
 calendar/gui/e-week-view-titles-item.c     |   17 ++++---
 calendar/gui/e-week-view.c                 |    2 +-
 calendar/gui/weekday-picker.c              |    1 -
 widgets/libfoocanvas/libart-compat.c       |   36 ++++++++++++++++
 widgets/libfoocanvas/libart-compat.h       |    7 +++
 widgets/misc/e-calendar-item.c             |   29 +++++++------
 widgets/misc/e-canvas-background.c         |   21 ++++-----
 widgets/misc/e-canvas-utils.c              |   13 ------
 widgets/misc/e-canvas-utils.h              |    3 -
 widgets/misc/e-canvas-vbox.c               |   14 ++++---
 widgets/misc/e-canvas.c                    |    1 +
 widgets/table/e-cell-text.c                |    1 +
 widgets/table/e-table-click-to-add.c       |    6 +-
 widgets/table/e-table-field-chooser-item.c |   13 ++++-
 widgets/table/e-table-group-container.c    |   16 ++++---
 widgets/table/e-table-header-item.c        |   18 +++++---
 widgets/table/e-table-item.c               |   13 ++++-
 widgets/table/e-table-utils.h              |    2 -
 widgets/table/e-tree.c                     |    3 +-
 widgets/table/e-tree.h                     |    1 -
 widgets/text/e-reflow.c                    |   37 ++++++++++-------
 widgets/text/e-text.c                      |   63 ++++++++++++++++-----------
 widgets/text/e-text.h                      |    1 -
 32 files changed, 285 insertions(+), 191 deletions(-)
---
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 4ac5e14..f9748c9 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -312,7 +312,7 @@ e_minicard_label_realize (FooCanvasItem *item)
 				 "draw_background", FALSE,
 				 "im_context", E_CANVAS (item->canvas)->im_context,
 				 NULL );
-	e_canvas_item_move_absolute(e_minicard_label->fieldname, 2, 1);
+	foo_canvas_item_move (e_minicard_label->fieldname, 2, 1);
 
 	e_minicard_label->field =
 	  foo_canvas_item_new( group,
@@ -326,7 +326,9 @@ e_minicard_label_realize (FooCanvasItem *item)
 				 "draw_background", FALSE,
 				 "im_context", E_CANVAS (item->canvas)->im_context,
 				 NULL );
-	e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1);
+	foo_canvas_item_move (
+		e_minicard_label->field,
+		(e_minicard_label->width / 2 + 2), 1);
 
 	set_colors (e_minicard_label);
 
@@ -497,7 +499,7 @@ e_minicard_label_reflow(FooCanvasItem *item, gint flags)
 	else
 		left_width = e_minicard_label->width / 2 - 4;
 
-	e_canvas_item_move_absolute(e_minicard_label->field, left_width + 6, 1);
+	foo_canvas_item_move (e_minicard_label->field, left_width + 6, 1);
 
 	if (old_height != e_minicard_label->height)
 		e_canvas_item_request_parent_reflow(item);
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index f13e30a..a2c86eb 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -520,7 +520,7 @@ e_minicard_realize (FooCanvasItem *item)
 				 "draw_background", FALSE,
 				 NULL );
 
-	e_canvas_item_move_absolute(e_minicard->header_text, 6, 6);
+	foo_canvas_item_move (e_minicard->header_text, 6, 6);
 
 	e_minicard->list_icon =
 		foo_canvas_item_new ( group,
@@ -728,9 +728,10 @@ e_minicard_resize_children( EMinicard *e_minicard )
 				       NULL );
 	}
 	if (e_minicard->list_icon) {
-		e_canvas_item_move_absolute(e_minicard->list_icon,
-					    e_minicard->width - e_minicard->list_icon_size - 3,
-					    3);
+		foo_canvas_item_move (
+			e_minicard->list_icon,
+			e_minicard->width - e_minicard->list_icon_size - 3,
+			3);
 	}
 	for ( list = e_minicard->fields; list; list = g_list_next( list ) ) {
 		foo_canvas_item_set( E_MINICARD_FIELD( list->data )->label,
@@ -787,7 +788,7 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
 	minicard_field->label = new_item;
 
 	e_minicard->fields = g_list_append( e_minicard->fields, minicard_field);
-	e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
+	foo_canvas_item_move (new_item, 2, e_minicard->height);
 	g_free(name);
 	g_free(string);
 }
@@ -866,7 +867,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
 		minicard_field->label = new_item;
 
 		e_minicard->fields = g_list_append( e_minicard->fields, minicard_field);
-		e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
+		foo_canvas_item_move (new_item, 2, e_minicard->height);
 		count++;
 		if (!is_list)
 			g_free (name);
@@ -1036,7 +1037,7 @@ e_minicard_reflow(FooCanvasItem *item, gint flags)
 			g_object_get (item,
 				      "height", &text_height,
 				      NULL);
-			e_canvas_item_move_absolute(item, 2, e_minicard->height);
+			foo_canvas_item_move (item, 2, e_minicard->height);
 			e_minicard->height += text_height;
 		}
 		e_minicard->height += 2;
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 01fbb0e..1a417b8 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -29,6 +29,8 @@
 #include <config.h>
 #endif
 
+#include <math.h>
+
 #include <libecal/e-cal-time-util.h>
 #include <e-calendar-view.h>
 
@@ -965,15 +967,15 @@ day_view_main_item_dispose (GObject *object)
 
 static void
 day_view_main_item_update (FooCanvasItem *item,
-			   gdouble *affine,
-			   ArtSVP *clip_path,
+			   gdouble i2w_dx,
+			   gdouble i2w_dy,
 			   gint flags)
 {
 	FooCanvasItemClass *canvas_item_class;
 
 	/* Chain up to parent's update() method. */
 	canvas_item_class = FOO_CANVAS_ITEM_CLASS (parent_class);
-	canvas_item_class->update (item, affine, clip_path, flags);
+	canvas_item_class->update (item, i2w_dx, i2w_dy, flags);
 
 	/* The item covers the entire canvas area. */
 	item->x1 = 0;
@@ -985,10 +987,7 @@ day_view_main_item_update (FooCanvasItem *item,
 static void
 day_view_main_item_draw (FooCanvasItem *canvas_item,
                          GdkDrawable *drawable,
-                         gint x,
-                         gint y,
-                         gint width,
-                         gint height)
+                         GdkEventExpose *expose)
 {
 	EDayViewMainItem *main_item;
 	EDayView *day_view;
@@ -997,6 +996,7 @@ day_view_main_item_draw (FooCanvasItem *canvas_item,
 	gint work_day_start_y, work_day_end_y;
 	gint day_x, day_w, work_day;
 	gint start_row, end_row, rect_x, rect_y, rect_width, rect_height;
+	gint x, y, width, height;
 	struct icaltimetype day_start_tt, today_tt;
 	gint weekday;
 	cairo_t *cr;
@@ -1004,6 +1004,11 @@ day_view_main_item_draw (FooCanvasItem *canvas_item,
 	GdkRegion *draw_region;
 	GdkRectangle rect;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	cr = gdk_cairo_create (drawable);
 
 	main_item = E_DAY_VIEW_MAIN_ITEM (canvas_item);
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index b5fa11a..fff7050 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -74,12 +74,12 @@ struct _EDayViewTimeItemPrivate {
 };
 
 static void e_day_view_time_item_update (FooCanvasItem *item,
-					 gdouble *affine,
-					 ArtSVP *clip_path, gint flags);
+					 gdouble i2w_dx,
+					 gdouble i2w_dy,
+					 gint flags);
 static void e_day_view_time_item_draw (FooCanvasItem *item,
 				       GdkDrawable *drawable,
-				       gint x, gint y,
-				       gint width, gint height);
+				       GdkEventExpose *expose);
 static gdouble e_day_view_time_item_point (FooCanvasItem *item,
 					  gdouble x, gdouble y,
 					  gint cx, gint cy,
@@ -258,12 +258,12 @@ e_day_view_time_item_get_type (void)
 
 static void
 e_day_view_time_item_update (FooCanvasItem *item,
-			    gdouble *affine,
-			    ArtSVP *clip_path,
+			    gdouble i2w_dx,
+			    gdouble i2w_dy,
 			    gint flags)
 {
 	if (FOO_CANVAS_ITEM_CLASS (parent_class)->update)
-		(* FOO_CANVAS_ITEM_CLASS (parent_class)->update) (item, affine, clip_path, flags);
+		(* FOO_CANVAS_ITEM_CLASS (parent_class)->update) (item, i2w_dx, i2w_dy, flags);
 
 	/* The item covers the entire canvas area. */
 	item->x1 = 0;
@@ -616,16 +616,19 @@ edvti_draw_zone (FooCanvasItem   *canvas_item,
 static void
 e_day_view_time_item_draw (FooCanvasItem *canvas_item,
 			   GdkDrawable	   *drawable,
-			   gint		    x,
-			   gint		    y,
-			   gint		    width,
-			   gint		    height)
+			   GdkEventExpose  *expose)
 {
 	EDayViewTimeItem *time_item;
+	gint x, y, width, height;
 
 	time_item = E_DAY_VIEW_TIME_ITEM (canvas_item);
 	g_return_if_fail (time_item != NULL);
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	edvti_draw_zone (canvas_item, drawable, x, y, width, height, 0, NULL);
 
 	if (time_item->priv->second_zone)
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 4ba2ece..c88d4f2 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -551,15 +551,15 @@ day_view_top_item_dispose (GObject *object)
 
 static void
 day_view_top_item_update (FooCanvasItem *item,
-                          gdouble *affine,
-                          ArtSVP *clip_path,
+                          gdouble i2w_dx,
+                          gdouble i2w_dy,
                           gint flags)
 {
 	FooCanvasItemClass *canvas_item_class;
 
 	/* Chain up to parent's update() method. */
 	canvas_item_class = FOO_CANVAS_ITEM_CLASS (parent_class);
-	canvas_item_class->update (item, affine, clip_path, flags);
+	canvas_item_class->update (item, i2w_dx, i2w_dy, flags);
 
 	/* The item covers the entire canvas area. */
 	item->x1 = 0;
@@ -571,10 +571,7 @@ day_view_top_item_update (FooCanvasItem *item,
 static void
 day_view_top_item_draw (FooCanvasItem *canvas_item,
                         GdkDrawable *drawable,
-                        gint x,
-                        gint y,
-                        gint width,
-                        gint height)
+                        GdkEventExpose *expose)
 {
 	EDayViewTopItem *top_item;
 	EDayView *day_view;
@@ -588,8 +585,14 @@ day_view_top_item_draw (FooCanvasItem *canvas_item,
 	PangoLayout *layout;
 	cairo_t *cr;
 	GdkColor bg, light, dark;
+	gint x, y, width, height;
 	gboolean show_dates;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	top_item = E_DAY_VIEW_TOP_ITEM (canvas_item);
 	day_view = e_day_view_top_item_get_day_view (top_item);
 	g_return_if_fail (day_view != NULL);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index ab0db57..9b53522 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -4853,8 +4853,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
 			       "clip_width", (gdouble) text_w,
 			       "clip_height", (gdouble) item_h,
 			       NULL);
-	e_canvas_item_move_absolute(event->canvas_item,
-				    text_x, item_y);
+	foo_canvas_item_move (event->canvas_item, text_x, item_y);
 
 	g_object_unref (layout);
 	g_object_unref (comp);
@@ -4988,8 +4987,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
 				       "clip_height", (gdouble) item_h,
 				       "x_offset", (gdouble) icons_offset,
 				       NULL);
-		e_canvas_item_move_absolute(event->canvas_item,
-					    item_x, item_y);
+		foo_canvas_item_move (event->canvas_item, item_x, item_y);
 	}
 }
 
@@ -7351,9 +7349,10 @@ e_day_view_update_top_canvas_drag (EDayView *day_view,
 			       "clip_width", item_w - (E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD) * 2,
 			       "clip_height", item_h - (E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD) * 2,
 			       NULL);
-	e_canvas_item_move_absolute (day_view->drag_long_event_item,
-				     item_x + E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD,
-				     item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD);
+	foo_canvas_item_move (
+		day_view->drag_long_event_item,
+		item_x + E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD,
+		item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD);
 
 	if (!(day_view->drag_long_event_rect_item->object.flags & FOO_CANVAS_ITEM_VISIBLE)) {
 		foo_canvas_item_raise_to_top (day_view->drag_long_event_rect_item);
@@ -7506,9 +7505,10 @@ e_day_view_update_main_canvas_drag (EDayView *day_view,
 			       "clip_width", item_w - E_DAY_VIEW_BAR_WIDTH - E_DAY_VIEW_EVENT_X_PAD * 2,
 			       "clip_height", item_h - (E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD) * 2,
 			       NULL);
-	e_canvas_item_move_absolute (day_view->drag_item,
-				     item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_EVENT_X_PAD,
-				     item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD);
+	foo_canvas_item_move (
+		day_view->drag_item,
+		item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_EVENT_X_PAD,
+		item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD);
 
 	if (!(day_view->drag_bar_item->object.flags & FOO_CANVAS_ITEM_VISIBLE)) {
 		foo_canvas_item_raise_to_top (day_view->drag_bar_item);
diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c
index dac2f25..6d4b7c8 100644
--- a/calendar/gui/e-meeting-time-sel-item.c
+++ b/calendar/gui/e-meeting-time-sel-item.c
@@ -48,12 +48,12 @@ static void e_meeting_time_selector_item_set_property (GObject *object,
 static void e_meeting_time_selector_item_realize (FooCanvasItem *item);
 static void e_meeting_time_selector_item_unrealize (FooCanvasItem *item);
 static void e_meeting_time_selector_item_update (FooCanvasItem *item,
-						 gdouble *affine,
-						 ArtSVP *clip_path, gint flags);
+						 gdouble i2w_dx,
+						 gdouble i2w_dy,
+						 gint flags);
 static void e_meeting_time_selector_item_draw (FooCanvasItem *item,
 					       GdkDrawable *drawable,
-					       gint x, gint y,
-					       gint width, gint height);
+					       GdkEventExpose *expose);
 static gdouble e_meeting_time_selector_item_point (FooCanvasItem *item,
 						  gdouble x, gdouble y,
 						  gint cx, gint cy,
@@ -226,10 +226,10 @@ e_meeting_time_selector_item_unrealize (FooCanvasItem *item)
 }
 
 static void
-e_meeting_time_selector_item_update (FooCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+e_meeting_time_selector_item_update (FooCanvasItem *item, gdouble i2w_dx, gdouble i2w_dy, gint flags)
 {
 	if (FOO_CANVAS_ITEM_CLASS (e_meeting_time_selector_item_parent_class)->update)
-		(* FOO_CANVAS_ITEM_CLASS (e_meeting_time_selector_item_parent_class)->update) (item, affine, clip_path, flags);
+		(* FOO_CANVAS_ITEM_CLASS (e_meeting_time_selector_item_parent_class)->update) (item, i2w_dx, i2w_dy, flags);
 
 	/* The grid covers the entire canvas area. */
 	item->x1 = 0;
@@ -243,18 +243,24 @@ e_meeting_time_selector_item_update (FooCanvasItem *item, gdouble *affine, ArtSV
  */
 
 static void
-e_meeting_time_selector_item_draw (FooCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height)
+e_meeting_time_selector_item_draw (FooCanvasItem *item, GdkDrawable *drawable, GdkEventExpose *expose)
 {
 	EMeetingTimeSelector *mts;
 	EMeetingTimeSelectorItem *mts_item;
 	EMeetingAttendee *ia;
 	gint day_x, meeting_start_x, meeting_end_x, bar_y, bar_height;
 	gint row, row_y, start_x, end_x;
+	gint x, y, width, height;
 	GDate date, last_date, current_date;
 	gboolean is_display_top, show_meeting_time;
 	GdkGC *gc, *stipple_gc;
 	cairo_t *cr;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	mts_item = E_MEETING_TIME_SELECTOR_ITEM (item);
 	mts = mts_item->mts;
 	g_return_if_fail (mts != NULL);
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 83724ce..d929a6c 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -630,8 +630,8 @@ week_view_event_item_get_property (GObject *object,
 
 static void
 week_view_event_item_update (FooCanvasItem *item,
-                             gdouble *affine,
-                             ArtSVP *clip_path,
+                             gdouble i2w_dx,
+                             gdouble i2w_dy,
                              gint flags)
 {
 	FooCanvasItemClass *canvas_item_class;
@@ -649,7 +649,7 @@ week_view_event_item_update (FooCanvasItem *item,
 
 	/* Chain up to parent's update() method. */
 	canvas_item_class = FOO_CANVAS_ITEM_CLASS (parent_class);
-	canvas_item_class->update (item, affine, clip_path, flags);
+	canvas_item_class->update (item, i2w_dx, i2w_dy, flags);
 
 	item->x1 = 0;
 	item->y1 = 0;
@@ -674,10 +674,7 @@ week_view_event_item_update (FooCanvasItem *item,
 static void
 week_view_event_item_draw (FooCanvasItem *canvas_item,
                            GdkDrawable *drawable,
-                           gint x,
-                           gint y,
-                           gint width,
-                           gint height)
+                           GdkEventExpose *expose)
 {
 	EWeekViewEventItem *event_item;
 	EWeekView *week_view;
@@ -689,6 +686,7 @@ week_view_event_item_draw (FooCanvasItem *canvas_item,
 	gint x1, y1, x2, y2, time_x, time_y;
 	gint icon_x, icon_y, time_width, min_end_time_x, max_icon_x;
 	gint rect_x, rect_w, rect_x2 = 0;
+	gint x, y, width, height;
 	gboolean one_day_event, editing_span = FALSE;
 	gint start_hour, start_minute, end_hour, end_minute;
 	gboolean draw_start, draw_end;
@@ -705,6 +703,11 @@ week_view_event_item_draw (FooCanvasItem *canvas_item,
 	GdkRectangle rect;
 	const gchar *color_spec;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	event_item = E_WEEK_VIEW_EVENT_ITEM (canvas_item);
 	parent = gtk_widget_get_parent (GTK_WIDGET (canvas_item->canvas));
 	g_return_if_fail (E_IS_WEEK_VIEW (parent));
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index 76754ed..08a2d53 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -354,15 +354,15 @@ week_view_main_item_dispose (GObject *object)
 
 static void
 week_view_main_item_update (FooCanvasItem *item,
-                            gdouble *affine,
-                            ArtSVP *clip_path,
+                            gdouble i2w_dx,
+                            gdouble i2w_dy,
                             gint flags)
 {
 	FooCanvasItemClass *canvas_item_class;
 
 	/* Chain up to parent's update() method. */
 	canvas_item_class = FOO_CANVAS_ITEM_CLASS (parent_class);
-	canvas_item_class->update (item, affine, clip_path, flags);
+	canvas_item_class->update (item, i2w_dx, i2w_dy, flags);
 
 	/* The item covers the entire canvas area. */
 	item->x1 = 0;
@@ -374,15 +374,18 @@ week_view_main_item_update (FooCanvasItem *item,
 static void
 week_view_main_item_draw (FooCanvasItem *canvas_item,
                           GdkDrawable *drawable,
-                          gint x,
-                          gint y,
-                          gint width,
-                          gint height)
+                          GdkEventExpose *expose)
 {
 	EWeekViewMainItem *main_item;
 	EWeekView *week_view;
 	GDate date;
 	gint num_days, day, day_x, day_y, day_w, day_h;
+	gint x, y, width, height;
+
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
 
 	main_item = E_WEEK_VIEW_MAIN_ITEM (canvas_item);
 	week_view = e_week_view_main_item_get_week_view (main_item);
diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c
index feced03..9c0ec32 100644
--- a/calendar/gui/e-week-view-titles-item.c
+++ b/calendar/gui/e-week-view-titles-item.c
@@ -97,15 +97,15 @@ week_view_titles_item_dispose (GObject *object)
 
 static void
 week_view_titles_item_update (FooCanvasItem *item,
-                              gdouble *affine,
-                              ArtSVP *clip_path,
+                              gdouble i2w_dx,
+                              gdouble i2w_dy,
                               gint flags)
 {
 	FooCanvasItemClass *canvas_item_class;
 
 	/* Chain up to parent's update() method. */
 	canvas_item_class = FOO_CANVAS_ITEM_CLASS (parent_class);
-	canvas_item_class->update (item, affine, clip_path, flags);
+	canvas_item_class->update (item, i2w_dx, i2w_dy, flags);
 
 	/* The item covers the entire canvas area. */
 	item->x1 = 0;
@@ -117,10 +117,7 @@ week_view_titles_item_update (FooCanvasItem *item,
 static void
 week_view_titles_item_draw (FooCanvasItem *canvas_item,
                             GdkDrawable *drawable,
-                            gint x,
-                            gint y,
-                            gint width,
-                            gint height)
+                            GdkEventExpose *expose)
 {
 	EWeekViewTitlesItem *titles_item;
 	EWeekView *week_view;
@@ -132,8 +129,14 @@ week_view_titles_item_draw (FooCanvasItem *canvas_item,
 	GtkAllocation allocation;
 	gboolean abbreviated;
 	gint weekday;
+	gint x, y, width, height;
 	PangoLayout *layout;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	titles_item = E_WEEK_VIEW_TITLES_ITEM (canvas_item);
 	week_view = e_week_view_titles_item_get_week_view (titles_item);
 	g_return_if_fail (week_view != NULL);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index a6ccb6d..39fffb3 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3243,7 +3243,7 @@ e_week_view_reshape_event_span (EWeekView *week_view,
 			       "clip_width", (gdouble) text_w,
 			       "clip_height", (gdouble) text_h,
 			       NULL);
-	e_canvas_item_move_absolute (span->text_item, text_x, text_y);
+	foo_canvas_item_move (span->text_item, text_x, text_y);
 
 	g_object_unref (comp);
 	g_object_unref (layout);
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index 3acdaa8..166277a 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -639,4 +639,3 @@ weekday_picker_get_week_start_day (WeekdayPicker *wp)
 	priv = wp->priv;
 	return priv->week_start_day;
 }
-
diff --git a/widgets/libfoocanvas/libart-compat.c b/widgets/libfoocanvas/libart-compat.c
index d89844b..061bf76 100644
--- a/widgets/libfoocanvas/libart-compat.c
+++ b/widgets/libfoocanvas/libart-compat.c
@@ -14,6 +14,42 @@ art_affine_point (ArtPoint *dst,
 }
 
 void
+art_affine_invert (gdouble dst[6],
+                   const gdouble src[6])
+{
+	gdouble r_det;
+
+	r_det = 1.0 / (src[0] * src[3] - src[1] * src[2]);
+	dst[0] = src[3] * r_det;
+	dst[1] = -src[1] * r_det;
+	dst[2] = -src[2] * r_det;
+	dst[3] = src[0] * r_det;
+	dst[4] = -src[4] * dst[0] - src[5] * dst[2];
+	dst[5] = -src[4] * dst[1] - src[5] * dst[3];
+}
+
+void
+art_affine_multiply (gdouble dst[6],
+                     const gdouble src1[6],
+                     const gdouble src2[6])
+{
+	gdouble d0, d1, d2, d3, d4, d5;
+
+	d0 = src1[0] * src2[0] + src1[1] * src2[2];
+	d1 = src1[0] * src2[1] + src1[1] * src2[3];
+	d2 = src1[2] * src2[0] + src1[3] * src2[2];
+	d3 = src1[2] * src2[1] + src1[3] * src2[3];
+	d4 = src1[4] * src2[0] + src1[5] * src2[2] + src2[4];
+	d5 = src1[4] * src2[1] + src1[5] * src2[3] + src2[5];
+	dst[0] = d0;
+	dst[1] = d1;
+	dst[2] = d2;
+	dst[3] = d3;
+	dst[4] = d4;
+	dst[5] = d5;
+}
+
+void
 art_drect_affine_transform (ArtDRect *dst,
                             const ArtDRect *src,
                             const gdouble affine[6])
diff --git a/widgets/libfoocanvas/libart-compat.h b/widgets/libfoocanvas/libart-compat.h
index 593707c..aa0dca3 100644
--- a/widgets/libfoocanvas/libart-compat.h
+++ b/widgets/libfoocanvas/libart-compat.h
@@ -23,6 +23,13 @@ void		art_affine_point		(ArtPoint *dst,
 						 const ArtPoint *src,
 						 const gdouble affine[6]);
 
+void		art_affine_invert		(gdouble dst[6],
+						 const gdouble src[6]);
+
+void		art_affine_multiply		(gdouble dst[6],
+						 const gdouble src1[6],
+						 const gdouble src2[6]);
+
 void		art_drect_affine_transform	(ArtDRect *dst,
 						 const ArtDRect *src,
 						 const gdouble affine[6]);
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 29293e0..b13483d 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -58,15 +58,12 @@ static void e_calendar_item_realize	(FooCanvasItem *item);
 static void e_calendar_item_unrealize	(FooCanvasItem *item);
 static void e_calendar_item_unmap	(FooCanvasItem *item);
 static void e_calendar_item_update	(FooCanvasItem *item,
-					 gdouble		 *affine,
-					 ArtSVP		 *clip_path,
+					 gdouble		 i2w_dx,
+					 gdouble		 i2w_dy,
 					 gint		  flags);
 static void e_calendar_item_draw	(FooCanvasItem *item,
 					 GdkDrawable	 *drawable,
-					 gint		  x,
-					 gint		  y,
-					 gint		  width,
-					 gint		  height);
+					 GdkEventExpose  *expose);
 static void e_calendar_item_draw_month	(ECalendarItem   *calitem,
 					 GdkDrawable	 *drawable,
 					 gint		  x,
@@ -885,9 +882,9 @@ e_calendar_item_unmap		(FooCanvasItem *item)
 
 static void
 e_calendar_item_update		(FooCanvasItem *item,
-				 gdouble		 *affine,
-				 ArtSVP		 *clip_path,
-				 gint		  flags)
+				 gdouble		i2w_dx,
+				 gdouble		i2w_dy,
+				 gint		flags)
 {
 	FooCanvasItemClass *item_class;
 	ECalendarItem *calitem;
@@ -900,7 +897,7 @@ e_calendar_item_update		(FooCanvasItem *item,
 
 	item_class = FOO_CANVAS_ITEM_CLASS (e_calendar_item_parent_class);
 	if (item_class->update != NULL)
-		item_class->update (item, affine, clip_path, flags);
+		item_class->update (item, i2w_dx, i2w_dy, flags);
 
 	calitem = E_CALENDAR_ITEM (item);
 	style = gtk_widget_get_style (GTK_WIDGET (item->canvas));
@@ -1021,25 +1018,29 @@ e_calendar_item_update		(FooCanvasItem *item,
 static void
 e_calendar_item_draw		(FooCanvasItem *canvas_item,
 				 GdkDrawable	 *drawable,
-				 gint		  x,
-				 gint		  y,
-				 gint		  width,
-				 gint		  height)
+				 GdkEventExpose  *expose)
 {
 	ECalendarItem *calitem;
 	GtkStyle *style;
 	gint char_height, row, col, row_y, bar_height, col_x;
 	gint xthickness, ythickness;
+	gint x, y, width, height;
 	PangoFontDescription *font_desc;
 	PangoContext *pango_context;
 	PangoFontMetrics *font_metrics;
 	cairo_t *cr;
 	GdkColor base, bg;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 #if 0
 	g_print ("In e_calendar_item_draw %i,%i %ix%i\n",
 		 x, y, width, height);
 #endif
+
 	calitem = E_CALENDAR_ITEM (canvas_item);
 	style = gtk_widget_get_style (GTK_WIDGET (canvas_item->canvas));
 
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index e11f386..58f9cda 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -36,6 +36,7 @@
 #include "misc/e-canvas.h"
 #include "misc/e-canvas-utils.h"
 #include "misc/e-hsv-utils.h"
+#include "libfoocanvas/libart-compat.h"
 
 #include "e-canvas-background.h"
 
@@ -127,13 +128,13 @@ ecb_bounds (FooCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble
  * FooCanvasItem::update method
  */
 static void
-ecb_update (FooCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+ecb_update (FooCanvasItem *item, gdouble i2w_dx, gdouble i2w_dy, gint flags)
 {
 	ArtPoint o1, o2;
 	ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
 
 	if (FOO_CANVAS_ITEM_CLASS (ecb_parent_class)->update)
-		FOO_CANVAS_ITEM_CLASS (ecb_parent_class)->update (item, affine, clip_path, flags);
+		FOO_CANVAS_ITEM_CLASS (ecb_parent_class)->update (item, i2w_dx, i2w_dy, flags);
 
 	o1.x = item->x1;
 	o1.y = item->y1;
@@ -268,9 +269,7 @@ ecb_set_property (GObject *object,
 
 		if (FOO_CANVAS_ITEM_REALIZED & GTK_OBJECT_FLAGS(item)) {
 			get_color (ecb);
-			if (!item->canvas->aa) {
-				gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
-			}
+			gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
 		}
 	}
 
@@ -346,8 +345,7 @@ ecb_realize (FooCanvasItem *item)
 
 	ecb->priv->gc = gdk_gc_new (bin_window);
 	get_color (ecb);
-	if (!item->canvas->aa)
-		gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
+	gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
 
 	set_stipple (ecb, NULL, FALSE);
 
@@ -370,16 +368,17 @@ ecb_unrealize (FooCanvasItem *item)
 static void
 ecb_draw (FooCanvasItem *item,
           GdkDrawable *drawable,
-          gint x,
-          gint y,
-          gint width,
-          gint height)
+          GdkEventExpose *expose)
 {
 	ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
 	gint x1, x2, y1, y2;
+	gint width, height;
 	gdouble i2c [6];
 	ArtPoint upper_left, lower_right, ecb_base_point;
 
+	width = expose->area.width;
+	height = expose->area.height;
+
 	/*
 	 * Find out our real position after grouping
 	 */
diff --git a/widgets/misc/e-canvas-utils.c b/widgets/misc/e-canvas-utils.c
index 442cd87..31b907b 100644
--- a/widgets/misc/e-canvas-utils.c
+++ b/widgets/misc/e-canvas-utils.c
@@ -23,19 +23,6 @@
 
 #include "e-canvas-utils.h"
 
-void
-e_canvas_item_move_absolute (FooCanvasItem *item, gdouble dx, gdouble dy)
-{
-	gdouble translate[6];
-
-	g_return_if_fail (item != NULL);
-	g_return_if_fail (FOO_IS_CANVAS_ITEM (item));
-
-	art_affine_translate (translate, dx, dy);
-
-	foo_canvas_item_affine_absolute (item, translate);
-}
-
 static double
 compute_offset(gint top, gint bottom, gint page_top, gint page_bottom)
 {
diff --git a/widgets/misc/e-canvas-utils.h b/widgets/misc/e-canvas-utils.h
index 6c1a5fd..1823f65 100644
--- a/widgets/misc/e-canvas-utils.h
+++ b/widgets/misc/e-canvas-utils.h
@@ -27,9 +27,6 @@
 
 G_BEGIN_DECLS
 
-void      e_canvas_item_move_absolute      (FooCanvasItem *item,
-					    gdouble           dx,
-					    gdouble           dy);
 void      e_canvas_item_show_area          (FooCanvasItem *item,
 					    gdouble           x1,
 					    gdouble           y1,
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 76cc142..93b2c0f 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -321,9 +321,10 @@ e_canvas_vbox_reflow( FooCanvasItem *item, gint flags )
 				      "height", &item_height,
 				      "width", &item_width,
 				      NULL);
-			e_canvas_item_move_absolute(FOO_CANVAS_ITEM(list->data),
-						    (gdouble) 0,
-						    (gdouble) running_height);
+			foo_canvas_item_move (
+				FOO_CANVAS_ITEM (list->data),
+				(gdouble) 0,
+				(gdouble) running_height);
 			running_height += item_height;
 			if (max_width < item_width)
 				max_width = item_width;
@@ -337,9 +338,10 @@ e_canvas_vbox_reflow( FooCanvasItem *item, gint flags )
 					      "width", &item_width,
 					      NULL);
 
-				e_canvas_item_move_absolute(FOO_CANVAS_ITEM(list->data),
-							    (gdouble) 0,
-							    (gdouble) running_height);
+				foo_canvas_item_move (
+					FOO_CANVAS_ITEM(list->data),
+					(gdouble) 0,
+					(gdouble) running_height);
 
 				running_height += item_height;
 				if (max_width < item_width)
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 4979cdc..ef51d77 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -25,6 +25,7 @@
 #include <gtk/gtk.h>
 
 #include "e-util/e-util.h"
+#include <libfoocanvas/libart-compat.h>
 
 #include "e-canvas.h"
 
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 3d9bd1f..a52978b 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -53,6 +53,7 @@
 #include "e-util/e-text-event-processor-emacs-like.h"
 #include "e-util/e-util.h"
 #include "misc/e-canvas.h"
+#include "libfoocanvas/libart-compat.h"
 #include "e-util/e-unicode.h"
 
 #include "e-table.h"
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 12b7c32..9d3e056 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -305,7 +305,7 @@ etcta_realize (FooCanvasItem *item)
 	ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
 
 	create_rect_and_text (etcta);
-	e_canvas_item_move_absolute (etcta->text, 2, 2);
+	foo_canvas_item_move (etcta->text, 2, 2);
 
 	if (FOO_CANVAS_ITEM_CLASS (etcta_parent_class)->realize)
 		(*FOO_CANVAS_ITEM_CLASS (etcta_parent_class)->realize)(item);
@@ -450,7 +450,7 @@ etcta_event (FooCanvasItem *item, GdkEvent *e)
 				gtk_object_destroy(GTK_OBJECT (etcta->row));
 				etcta->row = NULL;
 				create_rect_and_text (etcta);
-				e_canvas_item_move_absolute (etcta->text, 3, 3);
+				foo_canvas_item_move (etcta->text, 3, 3);
 			}
 			break;
 		}
@@ -614,5 +614,5 @@ e_table_click_to_add_commit (ETableClickToAdd *etcta)
 		etcta->row = NULL;
 	}
 	create_rect_and_text (etcta);
-	e_canvas_item_move_absolute (etcta->text, 3, 3);
+	foo_canvas_item_move (etcta->text, 3, 3);
 }
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index 2fe1f5b..6114923 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -35,6 +35,7 @@
 #include "e-util/e-util.h"
 #include "e-util/e-xml-utils.h"
 #include "misc/e-canvas.h"
+#include "libfoocanvas/libart-compat.h"
 
 #include "e-table-col-dnd.h"
 #include "e-table-defines.h"
@@ -176,14 +177,14 @@ etfci_reflow (FooCanvasItem *item, gint flags)
 }
 
 static void
-etfci_update (FooCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+etfci_update (FooCanvasItem *item, gdouble i2w_dx, gdouble i2w_dy, gint flags)
 {
 	ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
 	gdouble   i2c [6];
 	ArtPoint c1, c2, i1, i2;
 
 	if (FOO_CANVAS_ITEM_CLASS (etfci_parent_class)->update)
-		(*FOO_CANVAS_ITEM_CLASS (etfci_parent_class)->update)(item, affine, clip_path, flags);
+		(*FOO_CANVAS_ITEM_CLASS (etfci_parent_class)->update)(item, i2w_dx, i2w_dy, flags);
 
 	i1.x = i1.y = 0;
 	i2.x = etfci->width;
@@ -449,19 +450,25 @@ etfci_unrealize (FooCanvasItem *item)
 }
 
 static void
-etfci_draw (FooCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height)
+etfci_draw (FooCanvasItem *item, GdkDrawable *drawable, GdkEventExpose *expose)
 {
 	ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
 	FooCanvas *canvas = item->canvas;
 	gint rows;
 	gint y1, y2;
 	gint row;
+	gint x, y, width, height;
 	GtkStyle *style;
 	GtkStateType state;
 
 	if (etfci->combined_header == NULL)
 		return;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	rows = e_table_header_count (etfci->combined_header);
 
 	style = gtk_widget_get_style (GTK_WIDGET (canvas));
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index fc4b158..5588ef8 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -1090,13 +1090,15 @@ etgc_reflow (FooCanvasItem *item, gint flags)
 					      "height", &item_height,
 					      NULL);
 
-				e_canvas_item_move_absolute (FOO_CANVAS_ITEM(child_node->text),
-							    GROUP_INDENT,
-							    running_height - BUTTON_PADDING);
-
-				e_canvas_item_move_absolute (FOO_CANVAS_ITEM(child),
-							    GROUP_INDENT,
-							    running_height);
+				foo_canvas_item_move (
+					FOO_CANVAS_ITEM(child_node->text),
+					GROUP_INDENT,
+					running_height - BUTTON_PADDING);
+
+				foo_canvas_item_move (
+					FOO_CANVAS_ITEM(child),
+					GROUP_INDENT,
+					running_height);
 
 				foo_canvas_item_set (FOO_CANVAS_ITEM(child_node->rect),
 						      "x1", (gdouble) 0,
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index aabe796..e4119d0 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -39,6 +39,7 @@
 #include "e-util/e-xml-utils.h"
 #include "misc/e-canvas.h"
 #include "misc/e-popup-menu.h"
+#include "libfoocanvas/libart-compat.h"
 
 #include "e-table.h"
 #include "e-table-col-dnd.h"
@@ -184,8 +185,8 @@ e_table_header_item_get_height (ETableHeaderItem *ethi)
 
 static void
 ethi_update (FooCanvasItem *item,
-             gdouble *affine,
-             ArtSVP *clip_path,
+             gdouble i2w_dx,
+             gdouble i2w_dy,
              gint flags)
 {
 	ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
@@ -194,7 +195,7 @@ ethi_update (FooCanvasItem *item,
 	ArtPoint c1, c2, i1, i2;
 
 	if (FOO_CANVAS_ITEM_CLASS (ethi_parent_class)->update)
-		(*FOO_CANVAS_ITEM_CLASS (ethi_parent_class)->update)(item, affine, clip_path, flags);
+		(*FOO_CANVAS_ITEM_CLASS (ethi_parent_class)->update)(item, i2w_dx, i2w_dy, flags);
 
 	if (ethi->sort_info)
 		ethi->group_indent_width =
@@ -1002,16 +1003,14 @@ ethi_unrealize (FooCanvasItem *item)
 static void
 ethi_draw (FooCanvasItem *item,
            GdkDrawable *drawable,
-           gint x,
-           gint y,
-           gint width,
-           gint height)
+           GdkEventExpose *expose)
 {
 	ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
 	FooCanvas *canvas = item->canvas;
 	const gint cols = e_table_header_count (ethi->eth);
 	gint x1, x2;
 	gint col;
+	gint x, y, width, height;
 	GHashTable *arrows = g_hash_table_new (NULL, NULL);
 	GtkStateType state;
 	GtkStyle *style;
@@ -1019,6 +1018,11 @@ ethi_draw (FooCanvasItem *item,
 	state = gtk_widget_get_state (GTK_WIDGET (canvas));
 	style = gtk_widget_get_style (GTK_WIDGET (canvas));
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	if (ethi->sort_info) {
 		gint length = e_table_sort_info_grouping_get_count(ethi->sort_info);
 		gint i;
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 26d8ea0..e4554ea 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -43,6 +43,7 @@
 #include "misc/e-canvas.h"
 #include "misc/e-canvas-utils.h"
 #include "misc/e-hsv-utils.h"
+#include "libfoocanvas/libart-compat.h"
 
 #include "e-cell.h"
 #include "e-table-item.h"
@@ -482,13 +483,13 @@ eti_reflow (FooCanvasItem *item, gint flags)
  * FooCanvasItem::update method
  */
 static void
-eti_update (FooCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+eti_update (FooCanvasItem *item, gdouble i2w_dx, gdouble i2w_dy, gint flags)
 {
 	ArtPoint o1, o2;
 	ETableItem *eti = E_TABLE_ITEM (item);
 
 	if (FOO_CANVAS_ITEM_CLASS (eti_parent_class)->update)
-		(*FOO_CANVAS_ITEM_CLASS (eti_parent_class)->update)(item, affine, clip_path, flags);
+		(*FOO_CANVAS_ITEM_CLASS (eti_parent_class)->update)(item, i2w_dx, i2w_dy, flags);
 
 	o1.x = item->x1;
 	o1.y = item->y1;
@@ -1728,7 +1729,7 @@ eti_unrealize (FooCanvasItem *item)
 }
 
 static void
-eti_draw (FooCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height)
+eti_draw (FooCanvasItem *item, GdkDrawable *drawable, GdkEventExpose *expose)
 {
 	ETableItem *eti = E_TABLE_ITEM (item);
 	const gint rows = eti->rows;
@@ -1738,6 +1739,7 @@ eti_draw (FooCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width
 	gint first_row, last_row, y_offset, yd;
 	gint x1, x2;
 	gint f_x1, f_x2, f_y1, f_y2;
+	gint x, y, width, height;
 	gboolean f_found;
 	gdouble i2c [6];
 	ArtPoint eti_base, eti_base_item, lower_right;
@@ -1745,6 +1747,11 @@ eti_draw (FooCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width
 	gint height_extra = eti->horizontal_draw_grid ? 1 : 0;
 	cairo_t *cr;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	cr = gdk_cairo_create (drawable);
 
 	/*
diff --git a/widgets/table/e-table-utils.h b/widgets/table/e-table-utils.h
index 3ab494e..af7c1b1 100644
--- a/widgets/table/e-table-utils.h
+++ b/widgets/table/e-table-utils.h
@@ -46,5 +46,3 @@ ETableCol    *e_table_util_calculate_current_search_col  (ETableHeader        *h
 G_END_DECLS
 
 #endif /* _E_TABLE_UTILS_H_ */
-
-h
\ No newline at end of file
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 12b56f1..412dc9f 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -36,6 +36,7 @@
 #include "misc/e-canvas.h"
 #include "misc/e-canvas-utils.h"
 #include "misc/e-canvas-background.h"
+#include "libfoocanvas/foo-canvas.h"
 #include "text/e-text.h"
 
 #include "e-table-column-specification.h"
@@ -3595,7 +3596,7 @@ e_tree_set_info_message (ETree *tree, const gchar *info_message)
 			"clip_width", (gdouble) allocation.width - 60.0,
 			NULL);
 
-		e_canvas_item_move_absolute (tree->priv->info_text, 30, 30);
+		foo_canvas_item_move (tree->priv->info_text, 30, 30);
 
 		tree->priv->info_text_resize_id = g_signal_connect (tree, "size_allocate", G_CALLBACK (tree_size_allocate), tree);
 	} else
diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h
index b4b6c97..5a924b4 100644
--- a/widgets/table/e-tree.h
+++ b/widgets/table/e-tree.h
@@ -25,7 +25,6 @@
 
 #include <gtk/gtk.h>
 #include <libxml/tree.h>
-#include <libfoocanvas/foo-canvas.h>
 #include <misc/e-printable.h>
 
 #include <table/e-table-extras.h>
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index 912d33b..e86d12c 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -41,8 +41,8 @@ static gboolean e_reflow_event (FooCanvasItem *item, GdkEvent *event);
 static void e_reflow_realize (FooCanvasItem *item);
 static void e_reflow_unrealize (FooCanvasItem *item);
 static void e_reflow_draw (FooCanvasItem *item, GdkDrawable *drawable,
-				    gint x, gint y, gint width, gint height);
-static void e_reflow_update (FooCanvasItem *item, gdouble affine[6], ArtSVP *clip_path, gint flags);
+				    GdkEventExpose *expose);
+static void e_reflow_update (FooCanvasItem *item, gdouble i2w_dx, gdouble i2w_dy, gint flags);
 static gdouble e_reflow_point (FooCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, FooCanvasItem **actual_item);
 static void e_reflow_reflow (FooCanvasItem *item, gint flags);
 static void set_empty(EReflow *reflow);
@@ -526,9 +526,9 @@ set_empty(EReflow *reflow)
 						      "width", reflow->minimum_width,
 						      "text", reflow->empty_message,
 						      NULL);
-				e_canvas_item_move_absolute(reflow->empty_text,
-							    reflow->minimum_width / 2,
-							    0);
+				foo_canvas_item_move (
+					reflow->empty_text,
+					reflow->minimum_width / 2, 0);
 			} else {
 				gtk_object_destroy(GTK_OBJECT(reflow->empty_text));
 				reflow->empty_text = NULL;
@@ -546,9 +546,9 @@ set_empty(EReflow *reflow)
 							      "text", reflow->empty_message,
 							      "draw_background", FALSE,
 							      NULL);
-				e_canvas_item_move_absolute(reflow->empty_text,
-							    reflow->minimum_width / 2,
-							    0);
+				foo_canvas_item_move (
+					reflow->empty_text,
+					reflow->minimum_width / 2, 0);
 			}
 		}
 	} else {
@@ -1169,17 +1169,23 @@ e_reflow_event (FooCanvasItem *item, GdkEvent *event)
 }
 
 static void e_reflow_draw (FooCanvasItem *item, GdkDrawable *drawable,
-				    gint x, gint y, gint width, gint height)
+				    GdkEventExpose *expose)
 {
 	GtkStyle *style;
 	gint x_rect, y_rect, width_rect, height_rect;
+	gint x, y, width, height;
 	gdouble running_width;
 	EReflow *reflow = E_REFLOW(item);
 	gint i;
 	gdouble column_width;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	if (FOO_CANVAS_ITEM_CLASS(e_reflow_parent_class)->draw)
-		FOO_CANVAS_ITEM_CLASS(e_reflow_parent_class)->draw (item, drawable, x, y, width, height);
+		FOO_CANVAS_ITEM_CLASS(e_reflow_parent_class)->draw (item, drawable, expose);
 	column_width = reflow->column_width;
 	running_width = E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
 	y_rect = E_REFLOW_BORDER_WIDTH;
@@ -1252,7 +1258,7 @@ static void e_reflow_draw (FooCanvasItem *item, GdkDrawable *drawable,
 }
 
 static void
-e_reflow_update (FooCanvasItem *item, gdouble affine[6], ArtSVP *clip_path, gint flags)
+e_reflow_update (FooCanvasItem *item, gdouble i2w_dx, gdouble i2w_dy, gint flags)
 {
 	EReflow *reflow;
 	gdouble x0, x1, y0, y1;
@@ -1260,7 +1266,7 @@ e_reflow_update (FooCanvasItem *item, gdouble affine[6], ArtSVP *clip_path, gint
 	reflow = E_REFLOW (item);
 
 	if (FOO_CANVAS_ITEM_CLASS(e_reflow_parent_class)->update)
-		FOO_CANVAS_ITEM_CLASS(e_reflow_parent_class)->update (item, affine, clip_path, flags);
+		FOO_CANVAS_ITEM_CLASS(e_reflow_parent_class)->update (item, i2w_dx, i2w_dy, flags);
 
 	x0 = item->x1;
 	y0 = item->y1;
@@ -1405,9 +1411,10 @@ e_reflow_reflow( FooCanvasItem *item, gint flags )
 		}
 
 		if (unsorted >= 0 && reflow->items[unsorted]) {
-			e_canvas_item_move_absolute(FOO_CANVAS_ITEM(reflow->items[unsorted]),
-						    (gdouble) running_width,
-						    (gdouble) running_height);
+			foo_canvas_item_move (
+				FOO_CANVAS_ITEM(reflow->items[unsorted]),
+				(gdouble) running_width,
+				(gdouble) running_height);
 			running_height += reflow->heights[unsorted] + E_REFLOW_BORDER_WIDTH;
 		}
 	}
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 38c8b34..3fac25f 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -53,6 +53,7 @@
 #include <glib/gi18n.h>
 #include "e-util/e-text-event-processor-emacs-like.h"
 #include "e-util/e-util.h"
+#include "libfoocanvas/libart-compat.h"
 
 #include "e-text.h"
 
@@ -996,8 +997,7 @@ e_text_set_property (GObject *object,
 	       text->color = color;
                gdk_rgb_find_color (colormap, &text->color);
 
-	       if (!item->canvas->aa)
-		       set_text_gc_foreground (text);
+	       set_text_gc_foreground (text);
 
 	       text->needs_redraw = 1;
 	       needs_update = 1;
@@ -1191,7 +1191,7 @@ e_text_reflow (FooCanvasItem *item, gint flags)
 
 /* Update handler for the text item */
 static void
-e_text_update (FooCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+e_text_update (FooCanvasItem *item, gdouble i2w_dx, gdouble i2w_dy, gint flags)
 {
 	EText *text;
 	gdouble x1, y1, x2, y2;
@@ -1199,29 +1199,26 @@ e_text_update (FooCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint fla
 	text = E_TEXT (item);
 
 	if (FOO_CANVAS_ITEM_CLASS (e_text_parent_class)->update)
-		(* FOO_CANVAS_ITEM_CLASS (e_text_parent_class)->update) (item, affine, clip_path, flags);
-
-	if ( text->needs_recalc_bounds
-	     || (flags & FOO_CANVAS_UPDATE_AFFINE)) {
-		if (!item->canvas->aa) {
-			set_text_gc_foreground (text);
-			set_stipple (text, text->stipple, TRUE);
-			get_bounds (text, &x1, &y1, &x2, &y2);
-			if ( item->x1 != x1 ||
-			     item->x2 != x2 ||
-			     item->y1 != y1 ||
-			     item->y2 != y2 ) {
-				foo_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
-				item->x1 = x1;
-				item->y1 = y1;
-				item->x2 = x2;
-				item->y2 = y2;
-				text->needs_redraw = 1;
-				item->canvas->need_repick = TRUE;
-			}
-			if (!text->fill_clip_rectangle)
-				item->canvas->need_repick = TRUE;
+		(* FOO_CANVAS_ITEM_CLASS (e_text_parent_class)->update) (item, i2w_dx, i2w_dy, flags);
+
+	if ( text->needs_recalc_bounds) {
+		set_text_gc_foreground (text);
+		set_stipple (text, text->stipple, TRUE);
+		get_bounds (text, &x1, &y1, &x2, &y2);
+		if ( item->x1 != x1 ||
+		     item->x2 != x2 ||
+		     item->y1 != y1 ||
+		     item->y2 != y2 ) {
+			foo_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
+			item->x1 = x1;
+			item->y1 = y1;
+			item->x2 = x2;
+			item->y2 = y2;
+			text->needs_redraw = 1;
+			item->canvas->need_repick = TRUE;
 		}
+		if (!text->fill_clip_rectangle)
+			item->canvas->need_repick = TRUE;
 		text->needs_recalc_bounds = 0;
 	}
 	if (text->needs_redraw) {
@@ -1370,11 +1367,12 @@ show_pango_rectangle (EText *text, PangoRectangle rect)
 /* Draw handler for the text item */
 static void
 e_text_draw (FooCanvasItem *item, GdkDrawable *drawable,
-	     gint x, gint y, gint width, gint height)
+	     GdkEventExpose *expose)
 {
 	EText *text;
 	GdkRectangle rect, *clip_rect;
 	gint xpos, ypos;
+	gint x, y, width, height;
 	GdkGC *main_gc;
 	FooCanvas *canvas;
 	GtkWidget *widget;
@@ -1382,6 +1380,11 @@ e_text_draw (FooCanvasItem *item, GdkDrawable *drawable,
 	GtkStyle *style;
 	GtkStateType state;
 
+	x = expose->area.x;
+	y = expose->area.y;
+	width = expose->area.width;
+	height = expose->area.height;
+
 	text = E_TEXT (item);
 	canvas = FOO_CANVAS_ITEM(text)->canvas;
 	widget = GTK_WIDGET(canvas);
@@ -1726,6 +1729,13 @@ e_text_point (FooCanvasItem *item, gdouble x, gdouble y,
 	return 1;
 }
 
+/* Translate handler for the text item */
+static void
+e_text_translate (FooCanvasItem *item, gdouble dx, gdouble dy)
+{
+	/* FIXME */
+}
+
 /* Bounds handler for the text item */
 static void
 e_text_bounds (FooCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2)
@@ -3249,6 +3259,7 @@ e_text_class_init (ETextClass *klass)
 	item_class->unrealize = e_text_unrealize;
 	item_class->draw = e_text_draw;
 	item_class->point = e_text_point;
+	item_class->translate = e_text_translate;
 	item_class->bounds = e_text_bounds;
 	item_class->event = e_text_event;
 
diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h
index aa194d5..3716541 100644
--- a/widgets/text/e-text.h
+++ b/widgets/text/e-text.h
@@ -135,7 +135,6 @@ struct _EText {
 	gint height;			/* Rendered text height in pixels */
 
 	guint32 rgba;			/* RGBA color for text */
-	gdouble affine[6];               /* The item -> canvas affine */
 
 	gchar *ellipsis;                 /* The ellipsis characters.  NULL = "...". */
 	gdouble ellipsis_width;          /* The width of the ellipsis. */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]