[GRASS-SVN] r69107 - grass/trunk/display/d.northarrow

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 8 20:07:50 PDT 2016


Author: annakrat
Date: 2016-08-08 20:07:50 -0700 (Mon, 08 Aug 2016)
New Revision: 69107

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

Modified: grass/trunk/display/d.northarrow/draw_n_arrow.c
===================================================================
--- grass/trunk/display/d.northarrow/draw_n_arrow.c	2016-08-08 14:34:42 UTC (rev 69106)
+++ grass/trunk/display/d.northarrow/draw_n_arrow.c	2016-08-09 03:07:50 UTC (rev 69107)
@@ -35,8 +35,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.);
 
     if (line_width > 0)
         D_line_width(line_width);



More information about the grass-commit mailing list