Ver código fonte

very wide and height not set triggers a horizontal legend

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60142 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 11 anos atrás
pai
commit
7481911150
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      ps/ps.map/ps_fclrtbl.c

+ 6 - 2
ps/ps.map/ps_fclrtbl.c

@@ -79,8 +79,12 @@ int PS_fcolortable(void)
     /* 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;