[GRASS-SVN] r49402 - grass-addons/grass7/display/d.mon2

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 27 22:57:31 EST 2011


Author: hamish
Date: 2011-11-27 19:57:31 -0800 (Sun, 27 Nov 2011)
New Revision: 49402

Modified:
   grass-addons/grass7/display/d.mon2/d.mon2.py
Log:
sync to changed d.erase color= option, don't recenter qiv windows, DOS mode todo

Modified: grass-addons/grass7/display/d.mon2/d.mon2.py
===================================================================
--- grass-addons/grass7/display/d.mon2/d.mon2.py	2011-11-27 20:42:06 UTC (rev 49401)
+++ grass-addons/grass7/display/d.mon2/d.mon2.py	2011-11-28 03:57:31 UTC (rev 49402)
@@ -92,22 +92,25 @@
            print('GRASS_HEIGHT=%s' % options['height'])
         if flags['c']:
             print('GRASS_RENDER_IMMEDIATE=cairo')
-	else:
-	    print('GRASS_RENDER_IMMEDIATE=PNG')
+        else:
+            print('GRASS_RENDER_IMMEDIATE=PNG')
         print('GRASS_PNG_MAPPED=TRUE')
         print('GRASS_PNG_READ=TRUE')
         print('export GRASS_PNGFILE GRASS_WIDTH GRASS_HEIGHT GRASS_RENDER_IMMEDIATE GRASS_PNG_MAPPED GRASS_PNG_READ;')
 
-        print('d.erase color=%s;' % options['color'])
+        print('d.erase bgcolor=%s;' % options['color'])
         if handler == "none":
             grass.message("Image file is '%s'" % img_tmp)
         elif handler == "qiv":
-            print('qiv -T "%s" &' % img_tmp)  # add --center ?
+            print('qiv -e -T "%s" &' % img_tmp)  # add --center ?
         else:
             print('%s image="%s" percent=%s &' % ( handler, img_tmp, options['percent']) )
 
         sys.exit(0)
 
+    if flags['d']:
+        print('rem DOS export not yet implemented')
+        sys.exit(0)
 
 
     ## rest of this won't work, as parent can't inherit from the child..
@@ -127,10 +130,10 @@
     os.environ['GRASS_PNG_READ'] = 'TRUE'
     #? os.environ['GRASS_PNG_AUTO_WRITE'] = 'FALSE'
 
-    grass.run_command('d.erase', color = options['color'])
+    grass.run_command('d.erase', bgcolor = options['color'])
 
     if handler == "qiv":
-        ret = grass.call(['qiv', '-T', img_tmp])
+        ret = grass.call(['qiv', '-e', '-T', img_tmp])
     else:
         ret = grass.exec_command(handler, image = img_tmp, percent = options['percent'])
 



More information about the grass-commit mailing list