[GRASS-SVN] r63419 - grass-addons/grass7/display/d.frame

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 7 05:10:52 PST 2014


Author: martinl
Date: 2014-12-07 05:10:52 -0800 (Sun, 07 Dec 2014)
New Revision: 63419

Modified:
   grass-addons/grass7/display/d.frame/d.frame.py
Log:
d.frame: change 'at' to be lower-left (similar to other display modules)


Modified: grass-addons/grass7/display/d.frame/d.frame.py
===================================================================
--- grass-addons/grass7/display/d.frame/d.frame.py	2014-12-07 12:20:23 UTC (rev 63418)
+++ grass-addons/grass7/display/d.frame/d.frame.py	2014-12-07 13:10:52 UTC (rev 63419)
@@ -60,8 +60,9 @@
 #% required: no
 #% multiple: no
 #% key_desc: bottom,top,left,right
-#% label: Where to place the frame (top-left values in percent)
-#% description: Implies -c or --overwrite
+#% label: Screen coordinates in percent where to place the frame (0,0 is lower-left)
+#% options: 0-100
+#% description: Implies only when -c or --overwrite flag is given
 #%end
 
 import os
@@ -151,12 +152,12 @@
 # calculate position of the frame in percent
 def calculate_frame(frame, at, width, height):
     try:
-        t, b, l, r = map(float, at.split(','))
+        b, t, l, r = map(float, at.split(','))
     except:
         fatal(_("Invalid frame position: %s") % at)
 
     top = t / 100. * height
-    bottom = b / 100. * height
+    bottom = height - b / 100. * height
     left = l / 100. * width
     right = r / 100. * width
     



More information about the grass-commit mailing list