From: ellson <devnull@localhost>
Date: Thu, 6 Mar 2008 21:40:02 +0000 (+0000)
Subject: eliminate xshow code and structs
X-Git-Tag: LAST_LIBGRAPH~32^2~4558
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe52cbc553919a9860ed086f56977badbc709a8d;p=graphviz

eliminate xshow code and structs
---

diff --git a/plugin/gd/gvtextlayout_gd.c b/plugin/gd/gvtextlayout_gd.c
index 09abb4d9b..f872be686 100644
--- a/plugin/gd/gvtextlayout_gd.c
+++ b/plugin/gd/gvtextlayout_gd.c
@@ -110,9 +110,7 @@ static boolean gd_textlayout(textpara_t * para, char **fontpath)
     gdFTStringExtra strex;
     double fontsize;
 
-    strex.flags = gdFTEX_XSHOW
-	| gdFTEX_RETURNFONTPATHNAME | gdFTEX_RESOLUTION;
-    strex.xshow = NULL;
+    strex.flags = gdFTEX_RETURNFONTPATHNAME | gdFTEX_RESOLUTION;
     strex.hdpi = strex.vdpi = POINTS_PER_INCH;
 
     if (strstr(para->fontname, "/"))
@@ -123,7 +121,6 @@ static boolean gd_textlayout(textpara_t * para, char **fontpath)
     para->width = 0.0;
     para->height = 0.0;
     para->yoffset_layout = 0.0;
-    para->xshow = NULL;
 
     para->layout = NULL;
     para->free_layout = NULL;
@@ -157,12 +154,6 @@ static boolean gd_textlayout(textpara_t * para, char **fontpath)
 	    return FALSE; /* indicate error */
 	}
 
-	if (strex.xshow) {
-	    /* transfer malloc'ed xshow string to para */
-	    para->xshow = strex.xshow;
-	    strex.xshow = NULL;
-	}
-
 	if (fontpath)
 	    *fontpath = strex.fontpath;
 
diff --git a/plugin/pango/gvtextlayout_pango.c b/plugin/pango/gvtextlayout_pango.c
index e2035d3bf..1628d00f1 100644
--- a/plugin/pango/gvtextlayout_pango.c
+++ b/plugin/pango/gvtextlayout_pango.c
@@ -174,24 +174,6 @@ static boolean pango_textlayout(textpara_t * para, char **fontpath)
     /* The distance below midline for y centering of text strings */
     para->yoffset_centerline = 0.1 * para->fontsize;
 
-    /* determine position of each character in the layout */
-#ifdef ENABLE_PANGO_XSHOW
-    xshow_alloc = 128;
-    xshow_pos = 0;
-    para->xshow = malloc(xshow_alloc);
-    para->xshow[0] = '\0';
-    do {
-	pango_layout_iter_get_char_extents (iter, &char_rect);
-        if (xshow_alloc < xshow_pos + 16) {
-		xshow_alloc += 128;
-		para->xshow = realloc(para->xshow, xshow_alloc);
-	}
-	if (xshow_pos) para->xshow[xshow_pos++] = ' ';
-        xshow_pos += sprintf(para->xshow+xshow_pos, "%g", char_rect.width * textlayout_scale);
-    } while (pango_layout_iter_next_char (iter));
-#else
-    para->xshow = NULL;
-#endif
     pango_layout_iter_free (iter);
     if (logical_rect.width == 0)
 	return FALSE;