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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 26 09:37:24 EDT 2011


Author: hamish
Date: 2011-09-26 06:37:24 -0700 (Mon, 26 Sep 2011)
New Revision: 48479

Modified:
   grass/trunk/ps/ps.map/ps_fclrtbl.c
Log:
avoid FP legend ticks and border width from growing too huge (#1453)

Modified: grass/trunk/ps/ps.map/ps_fclrtbl.c
===================================================================
--- grass/trunk/ps/ps.map/ps_fclrtbl.c	2011-09-26 10:31:27 UTC (rev 48478)
+++ grass/trunk/ps/ps.map/ps_fclrtbl.c	2011-09-26 13:37:24 UTC (rev 48479)
@@ -121,7 +121,7 @@
     cwidth = 0.1;
     ncols = (int)height / cwidth;
     step = (dmax - dmin) / (ncols - 1);
-    lwidth = 0.02 * width;
+    lwidth = width > 72 ? 0.02 * 72 : 0.02 * width;
 
     /* Print color band */
     y = t;
@@ -201,8 +201,11 @@
     x1 = l + width + 0.1;
     if (ct.tickbar)		/* switch to draw tic all the way through bar */
 	x2 = x1 - width;
-    else
+    else {
 	x2 = x1 + 0.37 * width;
+	if (width > 36)
+	    x2 = x1 + 0.37 * 36;
+    }    
 
     /* do nice label: we need so many decimal places to hold all step decimal digits */
     if (step > 100) {		/* nice steps do not have > 2 digits, important separate, otherwise */



More information about the grass-commit mailing list