[GRASS-SVN] r33451 - grass/trunk/ps/ps.map

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 15 04:34:46 EDT 2008


Author: hamish
Date: 2008-09-15 04:34:46 -0400 (Mon, 15 Sep 2008)
New Revision: 33451

Modified:
   grass/trunk/ps/ps.map/ps_fclrtbl.c
Log:
add label placement hint (merge from devbr6)

Modified: grass/trunk/ps/ps.map/ps_fclrtbl.c
===================================================================
--- grass/trunk/ps/ps.map/ps_fclrtbl.c	2008-09-15 08:34:27 UTC (rev 33450)
+++ grass/trunk/ps/ps.map/ps_fclrtbl.c	2008-09-15 08:34:46 UTC (rev 33451)
@@ -257,6 +257,13 @@
 	    margin = 2;
 	fprintf(PS.fp, "/mg %.1f def\n", margin);
 
+	/* Hint from Glynn:
+	   You can use the `stringwidth` operator to obtain the width of a string
+	   (the distance that the current point will move if you `show` the string).
+	   If the string is short, you can obtain the bounding box with a combination
+	   of the `charpath` and `pathbbox` operators (if the string is long,
+	   `charpath` may overflow the maximum path length). */
+
 	/* select label position */
 	label_posn = 3;
 	/*  1 2



More information about the grass-commit mailing list