[GRASS-SVN] r69100 - grass/trunk/display/d.barscale

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Aug 7 12:32:54 PDT 2016


Author: annakrat
Date: 2016-08-07 12:32:54 -0700 (Sun, 07 Aug 2016)
New Revision: 69100

Modified:
   grass/trunk/display/d.barscale/draw_scale.c
Log:
d.barscale: fix layout when using frame, see #3121

Modified: grass/trunk/display/d.barscale/draw_scale.c
===================================================================
--- grass/trunk/display/d.barscale/draw_scale.c	2016-08-06 20:10:58 UTC (rev 69099)
+++ grass/trunk/display/d.barscale/draw_scale.c	2016-08-07 19:32:54 UTC (rev 69100)
@@ -91,8 +91,8 @@
     D_setup_unity(0);
     D_get_src(&t, &b, &l, &r);
 
-    x_pos = east * (r - l) / 100.;
-    y_pos = (100. - north) * (b - t) / 100.;
+    x_pos = l + (int)(east * (r - l) / 100.);
+    y_pos = t + (int)((100. - north) * (b - t) / 100.);
 
 
     D_setup(0);                 /* back to regular coordinate settings */



More information about the grass-commit mailing list