[evolution/rendering-cleanup: 33/78] gnome-canvas: Get rid of libart usage in the text items



commit 6797efa4dbc7c1269fda4cf79ee1349dc481fc37
Author: Benjamin Otte <otte redhat com>
Date:   Thu Oct 14 15:04:47 2010 +0200

    gnome-canvas: Get rid of libart usage in the text items

 libgnomecanvas/gnome-canvas-rich-text.c |   30 ++++++++++++------------------
 libgnomecanvas/gnome-canvas-text.c      |    2 --
 2 files changed, 12 insertions(+), 20 deletions(-)
---
diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c
index 8cf04e5..9d241f4 100644
--- a/libgnomecanvas/gnome-canvas-rich-text.c
+++ b/libgnomecanvas/gnome-canvas-rich-text.c
@@ -2112,29 +2112,23 @@ gnome_canvas_rich_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
 	GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
 	GtkStyle *style;
 	GtkWidget *widget;
-	gdouble i2w[6], w2c[6], i2c[6];
-	gdouble ax, ay;
+        cairo_matrix_t i2c;
+	gdouble ax, ay, ax2, ay2;
 	gint x1, y1, x2, y2;
-	ArtPoint i1, i2;
-	ArtPoint c1, c2;
 
-	gnome_canvas_item_i2w_affine (item, i2w);
-	gnome_canvas_w2c_affine (item->canvas, w2c);
-	art_affine_multiply (i2c, i2w, w2c);
+        gnome_canvas_item_i2c_matrix (item, &i2c);
 
 	adjust_for_anchors (text, &ax, &ay);
+	ax2 = ax + text->_priv->width;
+	ay2 = ay + text->_priv->height;
+
+        cairo_matrix_transform_point (&i2c, &ax, &ay);
+        cairo_matrix_transform_point (&i2c, &ax2, &ay2);
 
-	i1.x = ax;
-	i1.y = ay;
-	i2.x = ax + text->_priv->width;
-	i2.y = ay + text->_priv->height;
-	art_affine_point (&c1, &i1, i2c);
-	art_affine_point (&c2, &i2, i2c);
-
-	x1 = c1.x;
-	y1 = c1.y;
-	x2 = c2.x;
-	y2 = c2.y;
+	x1 = ax;
+	y1 = ay;
+	x2 = ax2;
+	y2 = ay2;
 
 	gtk_text_layout_set_screen_width (text->_priv->layout, x2 - x1);
 
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index b71b1af..0d4d915 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -41,8 +41,6 @@
 #include "gnome-canvas-text.h"
 #include <pango/pangoft2.h>
 
-#include <libart_lgpl/art_affine.h>
-#include <libart_lgpl/art_rgb.h>
 #include "gnome-canvas-util.h"
 #include "gnome-canvas-i18n.h"
 



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