[GRASS-SVN] r48494 - grass/branches/releasebranch_6_4/ps/ps.map

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 27 06:00:15 EDT 2011


Author: hamish
Date: 2011-09-27 03:00:15 -0700 (Tue, 27 Sep 2011)
New Revision: 48494

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

Modified: grass/branches/releasebranch_6_4/ps/ps.map/do_labels.c
===================================================================
--- grass/branches/releasebranch_6_4/ps/ps.map/do_labels.c	2011-09-27 09:59:42 UTC (rev 48493)
+++ grass/branches/releasebranch_6_4/ps/ps.map/do_labels.c	2011-09-27 10:00:15 UTC (rev 48494)
@@ -308,7 +308,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.)
@@ -320,7 +320,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/releasebranch_6_4/ps/ps.map/get_scalebar.c
===================================================================
--- grass/branches/releasebranch_6_4/ps/ps.map/get_scalebar.c	2011-09-27 09:59:42 UTC (rev 48493)
+++ grass/branches/releasebranch_6_4/ps/ps.map/get_scalebar.c	2011-09-27 10:00:15 UTC (rev 48494)
@@ -20,6 +20,7 @@
     "numbers	no_labels",
     "fontsize   fontsize",
     "background [Y|n]",
+    "width      #",
     ""
 };
 
@@ -142,7 +143,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/releasebranch_6_4/ps/ps.map/getgrid.c
===================================================================
--- grass/branches/releasebranch_6_4/ps/ps.map/getgrid.c	2011-09-27 09:59:42 UTC (rev 48493)
+++ grass/branches/releasebranch_6_4/ps/ps.map/getgrid.c	2011-09-27 10:00:15 UTC (rev 48494)
@@ -16,6 +16,7 @@
     "cross	cross_size",
     "color      color",
     "numbers    # [color]",
+    "width      #",
     ""
 };
 
@@ -108,7 +109,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 (getgrid)");
@@ -200,7 +201,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 (getgrid)");

Modified: grass/branches/releasebranch_6_4/ps/ps.map/ps_outline.c
===================================================================
--- grass/branches/releasebranch_6_4/ps/ps.map/ps_outline.c	2011-09-27 09:59:42 UTC (rev 48493)
+++ grass/branches/releasebranch_6_4/ps/ps.map/ps_outline.c	2011-09-27 10:00:15 UTC (rev 48494)
@@ -90,7 +90,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;
 	}
 	error(key, data, "illegal outline sub-request");



More information about the grass-commit mailing list