[GRASS-SVN] r74186 - grass/trunk/gui/wxpython/wxplot

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 7 17:59:07 PST 2019


Author: annakrat
Date: 2019-03-07 17:59:07 -0800 (Thu, 07 Mar 2019)
New Revision: 74186

Modified:
   grass/trunk/gui/wxpython/wxplot/base.py
Log:
wxGUI/wxplot: colors should be integers

Modified: grass/trunk/gui/wxpython/wxplot/base.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/base.py	2019-03-07 20:57:41 UTC (rev 74185)
+++ grass/trunk/gui/wxpython/wxplot/base.py	2019-03-08 01:59:07 UTC (rev 74186)
@@ -132,9 +132,9 @@
         for clr in six.iterkeys(grass.named_colors):
             if clr == 'white':
                 continue
-            r = grass.named_colors[clr][0] * 255
-            g = grass.named_colors[clr][1] * 255
-            b = grass.named_colors[clr][2] * 255
+            r = int(grass.named_colors[clr][0] * 255)
+            g = int(grass.named_colors[clr][1] * 255)
+            b = int(grass.named_colors[clr][2] * 255)
             self.colorDict[clr] = (r, g, b, 255)
 
     def InitPlotOpts(self, plottype):



More information about the grass-commit mailing list