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

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


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

Modified:
   grass/branches/develbranch_6/ps/ps.map/ps_fclrtbl.c
Log:
add label placement hint

Modified: grass/branches/develbranch_6/ps/ps.map/ps_fclrtbl.c
===================================================================
--- grass/branches/develbranch_6/ps/ps.map/ps_fclrtbl.c	2008-09-15 08:21:44 UTC (rev 33449)
+++ grass/branches/develbranch_6/ps/ps.map/ps_fclrtbl.c	2008-09-15 08:34:27 UTC (rev 33450)
@@ -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