Browse Source

d.northarrow: fix layout when using frame, see https://trac.osgeo.org/grass/ticket/3121

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@69107 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 8 năm trước cách đây
mục cha
commit
7805c5ffe4

+ 2 - 2
display/d.northarrow/draw_n_arrow.c

@@ -35,8 +35,8 @@ int draw_n_arrow(double east, double north, double rotation, char *lbl,
     D_setup_unity(0);
     D_setup_unity(0);
     D_get_src(&t, &b, &l, &r);
     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)
     if (line_width > 0)
         D_line_width(line_width);
         D_line_width(line_width);