[GRASS-SVN] r48493 - grass/branches/develbranch_6/ps/ps.map

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 27 05:59:42 EDT 2011


Author: hamish
Date: 2011-09-27 02:59:42 -0700 (Tue, 27 Sep 2011)
New Revision: 48493

Modified:
   grass/branches/develbranch_6/ps/ps.map/do_labels.c
   grass/branches/develbranch_6/ps/ps.map/get_scalebar.c
   grass/branches/develbranch_6/ps/ps.map/getgrid.c
   grass/branches/develbranch_6/ps/ps.map/ps_outline.c
Log:
bugfix: inch scaling was backwards (merge from trunk)

Modified: grass/branches/develbranch_6/ps/ps.map/do_labels.c
===================================================================
--- grass/branches/develbranch_6/ps/ps.map/do_labels.c	2011-09-27 09:56:50 UTC (rev 48492)
+++ grass/branches/develbranch_6/ps/ps.map/do_labels.c	2011-09-27 09:59:42 UTC (rev 48493)
@@ -307,7 +307,7 @@
 	    ch = ' ';
 	    sscanf(value, "%lf%c", &width, &ch);
 	    if (ch == 'i')
-		width = width / 72.0;
+		width = width * 72.0;
 	    if (width < 0.)
 		width = 1.;
 	    if (width > 25.)
@@ -319,7 +319,7 @@
 	    ch = ' ';
 	    sscanf(value, "%lf%c", &hwidth, &ch);
 	    if (ch == 'i')
-		hwidth = hwidth / 72.0;
+		hwidth = hwidth * 72.0;
 	    if (hwidth < 0.)
 		hwidth = 0.;
 	    if (hwidth > 5.)

Modified: grass/branches/develbranch_6/ps/ps.map/get_scalebar.c
===================================================================
--- grass/branches/develbranch_6/ps/ps.map/get_scalebar.c	2011-09-27 09:56:50 UTC (rev 48492)
+++ grass/branches/develbranch_6/ps/ps.map/get_scalebar.c	2011-09-27 09:59:42 UTC (rev 48493)
@@ -18,6 +18,7 @@
     "numbers	no_labels",
     "fontsize   fontsize",
     "background [Y|n]",
+    "width      #",
     ""
 };
 
@@ -140,7 +141,7 @@
 		error(key, data, "illegal grid width request");
 	    }
 	    if (ch == 'i')
-		sb.width = sb.width / 72.0;
+		sb.width = sb.width * 72.0;
 	    continue;
 	}
 

Modified: grass/branches/develbranch_6/ps/ps.map/getgrid.c
===================================================================
--- grass/branches/develbranch_6/ps/ps.map/getgrid.c	2011-09-27 09:56:50 UTC (rev 48492)
+++ grass/branches/develbranch_6/ps/ps.map/getgrid.c	2011-09-27 09:59:42 UTC (rev 48493)
@@ -17,6 +17,7 @@
     "cross	cross_size",
     "color      color",
     "numbers    # [color]",
+    "width      #",
     ""
 };
 
@@ -124,7 +125,7 @@
 		error(key, data, _("illegal grid width request"));
 	    }
 	    if (ch == 'i')
-		PS.grid_width = PS.grid_width / 72.0;
+		PS.grid_width = PS.grid_width * 72.0;
 	    continue;
 	}
 	error(key, data, _("illegal request (grid)"));
@@ -232,7 +233,7 @@
 		error(key, data, _("illegal grid width request"));
 	    }
 	    if (ch == 'i')
-		PS.geogrid_width = PS.geogrid_width / 72.0;
+		PS.geogrid_width = PS.geogrid_width * 72.0;
 	    continue;
 	}
 	error(key, data, _("illegal request (geogrid)"));

Modified: grass/branches/develbranch_6/ps/ps.map/ps_outline.c
===================================================================
--- grass/branches/develbranch_6/ps/ps.map/ps_outline.c	2011-09-27 09:56:50 UTC (rev 48492)
+++ grass/branches/develbranch_6/ps/ps.map/ps_outline.c	2011-09-27 09:59:42 UTC (rev 48493)
@@ -98,7 +98,7 @@
 		error(key, data, _("illegal width request"));
 	    }
 	    if (ch == 'i')
-		PS.outline_width = PS.outline_width / 72.;
+		PS.outline_width = PS.outline_width * 72.;
 	    continue;
 	}
 



More information about the grass-commit mailing list