[GRASS-SVN] r58473 - grass/trunk/gui/wxpython/mapwin

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 16 03:59:43 PST 2013


Author: martinl
Date: 2013-12-16 03:59:43 -0800 (Mon, 16 Dec 2013)
New Revision: 58473

Modified:
   grass/trunk/gui/wxpython/mapwin/buffered.py
Log:
wxGUI/mapwindow: support background color for text overlays


Modified: grass/trunk/gui/wxpython/mapwin/buffered.py
===================================================================
--- grass/trunk/gui/wxpython/mapwin/buffered.py	2013-12-16 11:29:24 UTC (rev 58472)
+++ grass/trunk/gui/wxpython/mapwin/buffered.py	2013-12-16 11:59:43 UTC (rev 58473)
@@ -343,6 +343,9 @@
             w, h = self.GetFullTextExtent(img['text'])[0:2]
             pdc.SetFont(img['font'])
             pdc.SetTextForeground(img['color'])
+            if 'background' in img:
+                pdc.SetBackgroundMode(wx.SOLID)
+                pdc.SetTextBackground(img['background'])
             coords, bbox = self.TextBounds(img)
             if rotation == 0:
                 pdc.DrawText(img['text'], coords[0], coords[1])



More information about the grass-commit mailing list