[GRASS-SVN] r62581 - in grass-addons/grass7: display/d.mon2 gui/wxpython/newgui vector/v.out.png
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 3 10:43:48 PST 2014
Author: martinl
Date: 2014-11-03 10:43:48 -0800 (Mon, 03 Nov 2014)
New Revision: 62581
Modified:
grass-addons/grass7/display/d.mon2/d.mon2.py
grass-addons/grass7/gui/wxpython/newgui/render2.py
grass-addons/grass7/vector/v.out.png/v.out.png.py
Log:
update grass7 addons: r62577
Modified: grass-addons/grass7/display/d.mon2/d.mon2.py
===================================================================
--- grass-addons/grass7/display/d.mon2/d.mon2.py 2014-11-03 18:41:40 UTC (rev 62580)
+++ grass-addons/grass7/display/d.mon2/d.mon2.py 2014-11-03 18:43:48 UTC (rev 62581)
@@ -19,13 +19,13 @@
#%Option
#% key: width
#% type: integer
-#% description: Width for display monitor if not set by GRASS_WIDTH
+#% description: Width for display monitor if not set by GRASS_RENDER_WIDTH
#% answer: 800
#%End
#%Option
#% key: height
#% type: integer
-#% description: Height for display monitor if not set by GRASS_HEIGHT
+#% description: Height for display monitor if not set by GRASS_RENDER_HEIGHT
#% answer: 600
#%End
#%Option
@@ -77,7 +77,7 @@
if options['tempfile']:
img_tmp = options['tempfile']
- #TODO: add option for GRASS_PNG_COMPRESSION=0,1-9
+ #TODO: add option for GRASS_RENDER_FILE_COMPRESSION=0,1-9
else:
img_tmp = grass.tempfile()
os.remove(img_tmp)
@@ -85,18 +85,18 @@
if flags['b']:
- print('GRASS_PNGFILE="%s"' % img_tmp)
- if not os.environ.has_key("GRASS_WIDTH"):
- print('GRASS_WIDTH=%s' % options['width'])
- if not os.environ.has_key("GRASS_HEIGHT"):
- print('GRASS_HEIGHT=%s' % options['height'])
+ print('GRASS_RENDER_FILE="%s"' % img_tmp)
+ if not os.environ.has_key("GRASS_RENDER_WIDTH"):
+ print('GRASS_RENDER_WIDTH=%s' % options['width'])
+ if not os.environ.has_key("GRASS_RENDER_HEIGHT"):
+ print('GRASS_RENDER_HEIGHT=%s' % options['height'])
if flags['c']:
print('GRASS_RENDER_IMMEDIATE=cairo')
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('GRASS_RENDER_FILE_MAPPED=TRUE')
+ print('GRASS_RENDER_FILE_READ=TRUE')
+ print('export GRASS_RENDER_FILE GRASS_RENDER_WIDTH GRASS_RENDER_HEIGHT GRASS_RENDER_IMMEDIATE GRASS_RENDER_FILE_MAPPED GRASS_RENDER_FILE_READ;')
print('d.erase bgcolor=%s;' % options['color'])
if handler == "none":
@@ -119,15 +119,15 @@
if not grass.find_program(handler, '--help'):
grass.fatal(_("'%s' not found.") % handler)
- os.environ['GRASS_PNGFILE'] = img_tmp
- if not os.environ.has_key("GRASS_WIDTH"):
- os.environ['GRASS_WIDTH'] = options['width']
- if not os.environ.has_key("GRASS_HEIGHT"):
- os.environ['GRASS_HEIGHT'] = options['height']
+ os.environ['GRASS_RENDER_FILE'] = img_tmp
+ if not os.environ.has_key("GRASS_RENDER_WIDTH"):
+ os.environ['GRASS_RENDER_WIDTH'] = options['width']
+ if not os.environ.has_key("GRASS_RENDER_HEIGHT"):
+ os.environ['GRASS_RENDER_HEIGHT'] = options['height']
if flags['c']:
os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
- os.environ['GRASS_PNG_MAPPED'] = 'TRUE'
- os.environ['GRASS_PNG_READ'] = 'TRUE'
+ os.environ['GRASS_RENDER_FILE_MAPPED'] = 'TRUE'
+ os.environ['GRASS_RENDER_FILE_READ'] = 'TRUE'
#? os.environ['GRASS_PNG_AUTO_WRITE'] = 'FALSE'
grass.run_command('d.erase', bgcolor = options['color'])
Modified: grass-addons/grass7/gui/wxpython/newgui/render2.py
===================================================================
--- grass-addons/grass7/gui/wxpython/newgui/render2.py 2014-11-03 18:41:40 UTC (rev 62580)
+++ grass-addons/grass7/gui/wxpython/newgui/render2.py 2014-11-03 18:43:48 UTC (rev 62581)
@@ -135,7 +135,7 @@
{'type' : self.type, 'name' : self.name})
if self.mapfile:
- os.environ["GRASS_PNGFILE"] = self.mapfile
+ os.environ["GRASS_RENDER_FILE"] = self.mapfile
# execute command
try:
@@ -146,9 +146,9 @@
if ret != 0:
break
if not read:
- os.environ["GRASS_PNG_READ"] = "TRUE"
+ os.environ["GRASS_RENDER_FILE_READ"] = "TRUE"
- os.environ["GRASS_PNG_READ"] = "FALSE"
+ os.environ["GRASS_RENDER_FILE_READ"] = "FALSE"
else:
ret, msg = self._runCommand(self.cmd)
if ret != 0:
@@ -166,8 +166,8 @@
f = None
# stop monitor
- if self.mapfile and "GRASS_PNGFILE" in os.environ:
- del os.environ["GRASS_PNGFILE"]
+ if self.mapfile and "GRASS_RENDER_FILE" in os.environ:
+ del os.environ["GRASS_RENDER_FILE"]
self.forceRender = False
@@ -405,11 +405,11 @@
self.receiver = None
# GRASS environment variable (for rendering)
- self.env = {"GRASS_BACKGROUNDCOLOR" : "FFFFFF",
+ self.env = {"GRASS_RENDER_BACKGROUNDCOLOR" : "FFFFFF",
"GRASS_COMPRESSION" : "0",
- "GRASS_TRUECOLOR" : "TRUE",
+ "GRASS_RENDER_TRUECOLOR" : "TRUE",
"GRASS_TRANSPARENT" : "TRUE",
- "GRASS_PNG_READ" : "FALSE",
+ "GRASS_RENDER_FILE_READ" : "FALSE",
}
for k, v in self.env.iteritems():
@@ -947,8 +947,8 @@
tmp_region = os.getenv("GRASS_REGION")
os.environ["GRASS_REGION"] = self.SetRegion(windres)
- os.environ["GRASS_WIDTH"] = str(self.width)
- os.environ["GRASS_HEIGHT"] = str(self.height)
+ os.environ["GRASS_RENDER_WIDTH"] = str(self.width)
+ os.environ["GRASS_RENDER_HEIGHT"] = str(self.height)
driver = UserSettings.Get(group = 'display', key = 'driver', subkey = 'type')
if driver == 'png':
os.environ["GRASS_RENDER_IMMEDIATE"] = "png"
Modified: grass-addons/grass7/vector/v.out.png/v.out.png.py
===================================================================
--- grass-addons/grass7/vector/v.out.png/v.out.png.py 2014-11-03 18:41:40 UTC (rev 62580)
+++ grass-addons/grass7/vector/v.out.png/v.out.png.py 2014-11-03 18:43:48 UTC (rev 62581)
@@ -59,10 +59,10 @@
def main():
os.environ['GRASS_RENDER_IMMEDIATE'] = 'png'
- os.environ['GRASS_PNGFILE'] = options['output']
- os.environ['GRASS_PNG_COMPRESSION'] = options['compression']
- os.environ['GRASS_WIDTH'] = options['width']
- os.environ['GRASS_HEIGHT'] = options['height']
+ os.environ['GRASS_RENDER_FILE'] = options['output']
+ os.environ['GRASS_RENDER_FILE_COMPRESSION'] = options['compression']
+ os.environ['GRASS_RENDER_WIDTH'] = options['width']
+ os.environ['GRASS_RENDER_HEIGHT'] = options['height']
monitor_old = None
genv = gisenv()
More information about the grass-commit
mailing list