[GRASS-SVN] r45316 - grass/branches/develbranch_6/ps/ps.map

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 5 20:41:33 EST 2011


Author: hamish
Date: 2011-02-05 17:41:33 -0800 (Sat, 05 Feb 2011)
New Revision: 45316

Modified:
   grass/branches/develbranch_6/ps/ps.map/ps_clrtbl.c
Log:
bugfix: attempt to fix categorical raster legend column wrap

Modified: grass/branches/develbranch_6/ps/ps.map/ps_clrtbl.c
===================================================================
--- grass/branches/develbranch_6/ps/ps.map/ps_clrtbl.c	2011-02-06 00:33:17 UTC (rev 45315)
+++ grass/branches/develbranch_6/ps/ps.map/ps_clrtbl.c	2011-02-06 01:41:33 UTC (rev 45316)
@@ -107,7 +107,7 @@
 	tl = 72.0 * col_width - 2.0 * fontsize;
     else
 	tl = 72.0 * col_width - 4.0 * fontsize;
-    G_debug(5, "clrtbl: adjusted fontsize = %.1f", tl);
+    G_debug(5, "clrtbl: fontsize=%.1f  adjusted tl=%.1f", fontsize, tl);
     fprintf(PS.fp, "/s %.1f def\n", fontsize);
     fprintf(PS.fp, "mw %.1f gt {/s s %.1f mul mw div def } if\n", tl, tl);
     fprintf(PS.fp, "(%s) FN s SF\n", ct.font);
@@ -236,8 +236,9 @@
 	    if (center_cols)
 		fprintf(PS.fp, "mvx ");
 	    fprintf(PS.fp, "%.1f MS\n", y);
+
 	    i++;
-	    if (i >= num_cats)
+	    if (i > num_cats)
 		j = ct.cols + 1;
 	}
     }



More information about the grass-commit mailing list