瀏覽代碼

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

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@69100 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 8 年之前
父節點
當前提交
e1bae0e538
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      display/d.barscale/draw_scale.c

+ 2 - 2
display/d.barscale/draw_scale.c

@@ -91,8 +91,8 @@ int draw_scale(double east, double north, int length, int seg, int units,
     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 */