aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-10-14 21:04:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-30 01:50:00 +0800
commit201eed955801a1fbe1dcf263f79b4bbcf1441aba (patch)
tree4a6178788c946b82ee7ffbecaffc8b75048166ba /libgnomecanvas
parent2a7f6208e4d6dbfccd77007030a7bc902f219202 (diff)
downloadgsoc2013-evolution-201eed955801a1fbe1dcf263f79b4bbcf1441aba.tar.gz
gsoc2013-evolution-201eed955801a1fbe1dcf263f79b4bbcf1441aba.tar.zst
gsoc2013-evolution-201eed955801a1fbe1dcf263f79b4bbcf1441aba.zip
gnome-canvas: Get rid of libart usage in the text items
Diffstat (limited to 'libgnomecanvas')
-rw-r--r--libgnomecanvas/gnome-canvas-rich-text.c30
-rw-r--r--libgnomecanvas/gnome-canvas-text.c2
2 files changed, 12 insertions, 20 deletions
diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c
index 64efcbddd7..771340a74a 100644
--- a/libgnomecanvas/gnome-canvas-rich-text.c
+++ b/libgnomecanvas/gnome-canvas-rich-text.c
@@ -2038,30 +2038,24 @@ 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);
ax = text->_priv->x;
ay = text->_priv->y;
+ 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 d857eceac0..830a2256f8 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"