소스 검색

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 년 전
부모
커밋
7481911150
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  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 height and width are not given, calculate defaults */
     if (ct.width <= 0)
     if (ct.width <= 0)
 	ct.width = 2 * ct.fontsize / 72.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;
     dy = 1.5 * ct.fontsize;