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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 7 01:05:31 PDT 2014


Author: hamish
Date: 2014-05-07 01:05:31 -0700 (Wed, 07 May 2014)
New Revision: 60142

Modified:
   grass/trunk/ps/ps.map/ps_fclrtbl.c
Log:
very wide and height not set triggers a horizontal legend

Modified: grass/trunk/ps/ps.map/ps_fclrtbl.c
===================================================================
--- grass/trunk/ps/ps.map/ps_fclrtbl.c	2014-05-07 07:46:57 UTC (rev 60141)
+++ grass/trunk/ps/ps.map/ps_fclrtbl.c	2014-05-07 08:05:31 UTC (rev 60142)
@@ -79,8 +79,12 @@
     /* if height and width are not given, calculate defaults */
     if (ct.width <= 0)
 	ct.width = 2 * ct.fontsize / 72.0;
-    if (ct.height <= 0)
-	ct.height = 10 * ct.fontsize / 72.0;
+    if (ct.height <= 0) {
+	if (ct.width < 1.5)
+	    ct.height = 10 * ct.fontsize / 72.0;
+	else /* very wide and height not set triggers a horizontal legend */
+	    ct.height = 1.5 * ct.fontsize / 72.0;
+    }
 
     dy = 1.5 * ct.fontsize;
 



More information about the grass-commit mailing list