From 93241facc73ac391d50571882158a31ffb3bac79 Mon Sep 17 00:00:00 2001
From: edgrif <edgrif>
Date: Tue, 16 Mar 2010 13:17:25 +0000
Subject: [PATCH] update from latest gnome foocanvas

---
 .../libfoocanvas/foo-canvas-text.c.diff       | 92 ++-----------------
 1 file changed, 7 insertions(+), 85 deletions(-)

diff --git a/foocanvas/zmap_source/libfoocanvas/foo-canvas-text.c.diff b/foocanvas/zmap_source/libfoocanvas/foo-canvas-text.c.diff
index 60621b335..ab4b39d35 100644
--- a/foocanvas/zmap_source/libfoocanvas/foo-canvas-text.c.diff
+++ b/foocanvas/zmap_source/libfoocanvas/foo-canvas-text.c.diff
@@ -1,90 +1,12 @@
---- ./tmp_merged_foocanvas/libfoocanvas/foo-canvas-text.c	2010-03-12 18:06:31.352000000 +0000
-+++ ./tmp_zmap_foocanvas/libfoocanvas/foo-canvas-text.c	2010-03-12 18:06:22.716000000 +0000
-@@ -1,6 +1,7 @@
-+/*  Last edited: Mar  8 10:25 2010 (edgrif) */
+--- ./tmp_merged_foocanvas/libfoocanvas/foo-canvas-text.c	2010-03-16 13:12:15.885000000 +0000
++++ ./tmp_zmap_foocanvas/libfoocanvas/foo-canvas-text.c	2010-03-16 13:13:24.157000000 +0000
+@@ -1,7 +1,7 @@
+-/*  Last edited: Mar  8 10:25 2010 (edgrif) */
++/*  Last edited: Mar 16 13:13 2010 (edgrif) */
  /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
  /*
-- * $Id: foo-canvas-text.c 59 2008-06-21 15:57:11Z jody $
-+ * $Id: foo-canvas-text.c,v 1.1 2010-03-10 15:27:23 edgrif Exp $
+- * $Id: foo-canvas-text.c,v 1.1 2010-03-10 15:27:23 edgrif Exp $
++ * $Id: foo-canvas-text.c 59 2008-06-21 15:57:11Z jody $
   * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
   * All rights reserved.
   *
-@@ -582,8 +583,8 @@
- 	/* Get canvas pixel coordinates for clip rectangle position */
- 
- 	foo_canvas_w2c (item->canvas, wx, wy, &text->clip_cx, &text->clip_cy);
--	text->clip_cwidth = text->clip_width * item->canvas->pixels_per_unit;
--	text->clip_cheight = text->clip_height * item->canvas->pixels_per_unit;
-+	text->clip_cwidth = text->clip_width * item->canvas->pixels_per_unit_x;
-+	text->clip_cheight = text->clip_height * item->canvas->pixels_per_unit_y;
- 
- 	/* Anchor text */
- 
-@@ -943,7 +944,7 @@
- 	case PROP_WRAP_WIDTH: {
- 		double w = fabs (g_value_get_double (value));
- 		pango_layout_set_width (text->layout,
--			w * text->item.canvas->pixels_per_unit * PANGO_SCALE);
-+			w * text->item.canvas->pixels_per_unit_x * PANGO_SCALE);
- 
- 		break;
- 	}
-@@ -1219,11 +1220,11 @@
- 		break;
- 
- 	case PROP_TEXT_WIDTH:
--		g_value_set_double (value, text->max_width / text->item.canvas->pixels_per_unit);
-+		g_value_set_double (value, text->max_width / text->item.canvas->pixels_per_unit_x);
- 		break;
- 
- 	case PROP_TEXT_HEIGHT:
--		g_value_set_double (value, text->height / text->item.canvas->pixels_per_unit);
-+		g_value_set_double (value, text->height / text->item.canvas->pixels_per_unit_y);
- 		break;
- 
- 	default:
-@@ -1276,7 +1277,8 @@
- 	if (text->rise_set)
- 		add_attr (attr_list, pango_attr_rise_new (text->rise));
- 
--	zoom = text->item.canvas->pixels_per_unit;
-+	/* guessing that the x factor is OK here. RNGC */
-+	zoom = text->item.canvas->pixels_per_unit_x;
- 	if (fabs (zoom - 1.) > 1e-4) {
- 		PangoAttribute *attr = pango_attr_scale_new (zoom);
- 		attr->start_index = 0;
-@@ -1496,15 +1498,21 @@
- 			return 0.0;
- 		}
- 
-+		/* convert to difference in world coords as that's
-+		 * what $best is measured in. */
-+		dx /= item->canvas->pixels_per_unit_x;
-+		dy /= item->canvas->pixels_per_unit_y;
-+
- 		dist = sqrt (dx * dx + dy * dy);
-+
- 		if (dist < best)
--			best = dist;
-+		  best = dist;
- 
- 	} while (pango_layout_iter_next_line(iter));
- 
- 	pango_layout_iter_free(iter);
- 
--	return best / item->canvas->pixels_per_unit;
-+	return best;
- }
- 
- static void
-@@ -1534,8 +1542,8 @@
- 		width = text->clip_width;
- 		height = text->clip_height;
- 	} else {
--		width = text->max_width / item->canvas->pixels_per_unit;
--		height = text->height / item->canvas->pixels_per_unit;
-+		width = text->max_width / item->canvas->pixels_per_unit_x;
-+		height = text->height / item->canvas->pixels_per_unit_y;
- 	}
- 
- 	switch (text->anchor) {
-- 
GitLab