[GRASS-SVN] r70841 - grass/trunk/display/d.text

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 5 19:19:45 PDT 2017


Author: annakrat
Date: 2017-04-05 19:19:45 -0700 (Wed, 05 Apr 2017)
New Revision: 70841

Modified:
   grass/trunk/display/d.text/main.c
Log:
d.text: fix #70840 when using bgcolor

Modified: grass/trunk/display/d.text/main.c
===================================================================
--- grass/trunk/display/d.text/main.c	2017-04-05 23:39:56 UTC (rev 70840)
+++ grass/trunk/display/d.text/main.c	2017-04-06 02:19:45 UTC (rev 70841)
@@ -683,10 +683,10 @@
     }
 
     if (do_background) {
- 	pl = *x - size/2; /* some pixels margin for both sides */
- 	pt = *y + size/2;
- 	pr = *x + w + size/2;
- 	pb = *y - h - size/2;
+ 	pl = D_d_to_u_col(*x - size/2); /* some pixels margin for both sides */
+ 	pt = D_d_to_u_row(*y + size/2);
+ 	pr = D_d_to_u_col(*x + w + size/2);
+ 	pb = D_d_to_u_row(*y - h - size/2);
 	D_use_color(bg_color);
  	D_box_abs(pl, pt, pr, pb);    /* draw the box */
  	D_use_color(fg_color); /* restore */



More information about the grass-commit mailing list