[GRASS-SVN] r69109 - in grass/branches/releasebranch_7_0/display: d.barscale d.northarrow
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Aug 8 20:12:10 PDT 2016
Author: annakrat
Date: 2016-08-08 20:12:10 -0700 (Mon, 08 Aug 2016)
New Revision: 69109
Modified:
grass/branches/releasebranch_7_0/display/d.barscale/draw_scale.c
grass/branches/releasebranch_7_0/display/d.northarrow/draw_n_arrow.c
Log:
d.barscale/northarrow: fix layout when using frame, see #3121 (merge from trunk, r69100, r69107)
Modified: grass/branches/releasebranch_7_0/display/d.barscale/draw_scale.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.barscale/draw_scale.c 2016-08-09 03:10:59 UTC (rev 69108)
+++ grass/branches/releasebranch_7_0/display/d.barscale/draw_scale.c 2016-08-09 03:12:10 UTC (rev 69109)
@@ -87,8 +87,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 */
Modified: grass/branches/releasebranch_7_0/display/d.northarrow/draw_n_arrow.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.northarrow/draw_n_arrow.c 2016-08-09 03:10:59 UTC (rev 69108)
+++ grass/branches/releasebranch_7_0/display/d.northarrow/draw_n_arrow.c 2016-08-09 03:12:10 UTC (rev 69109)
@@ -33,8 +33,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