[GRASS-SVN] r45307 - grass/trunk/ps/ps.map

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 4 04:00:14 EST 2011


Author: hamish
Date: 2011-02-04 01:00:14 -0800 (Fri, 04 Feb 2011)
New Revision: 45307

Modified:
   grass/trunk/ps/ps.map/main.c
Log:
fix -b flag (currently ref bottom-left of paper)

Modified: grass/trunk/ps/ps.map/main.c
===================================================================
--- grass/trunk/ps/ps.map/main.c	2011-02-04 08:48:43 UTC (rev 45306)
+++ grass/trunk/ps/ps.map/main.c	2011-02-04 09:00:14 UTC (rev 45307)
@@ -132,9 +132,9 @@
     eflag->description =
 	_("Create EPS (Encapsulated PostScript) instead of PostScript file");
 
-    eflag = G_define_flag();
-    eflag->key = 'b';
-    eflag->description =
+    bflag = G_define_flag();
+    bflag->key = 'b';
+    bflag->description =
 	_("Print map-box's position on the page and exit (inches from top-left of paper)");
 
     input_file = G_define_option();
@@ -722,8 +722,10 @@
     reset_map_location();
 
     if (bflag->answer) {
-	fprintf(stdout, "bbox=%.3f,%.3f,%.3f,%.3f\n", PS.map_left,
-		PS.map_top, PS.map_right, PS.map_bot); /* +/- 0.5 ? see ps.map.c brd.* */
+	map_setup();
+	fprintf(stdout, "bbox=%.3f,%.3f,%.3f,%.3f\n", PS.map_left / 72.0,
+		PS.map_top / 72.0, PS.map_right / 72.0, PS.map_bot / 72.0);
+		/* +/- 0.5 ? see ps.map.c brd.* */
 	exit(EXIT_SUCCESS);
     }
 



More information about the grass-commit mailing list