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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 27 05:55:29 EDT 2011


Author: hamish
Date: 2011-09-27 02:55:28 -0700 (Tue, 27 Sep 2011)
New Revision: 48491

Modified:
   grass/trunk/ps/ps.map/do_labels.c
   grass/trunk/ps/ps.map/get_scalebar.c
   grass/trunk/ps/ps.map/getgrid.c
   grass/trunk/ps/ps.map/ps_outline.c
Log:
bugfix: inch scaling was backwards

Modified: grass/trunk/ps/ps.map/do_labels.c
===================================================================
--- grass/trunk/ps/ps.map/do_labels.c	2011-09-27 09:03:37 UTC (rev 48490)
+++ grass/trunk/ps/ps.map/do_labels.c	2011-09-27 09:55:28 UTC (rev 48491)
@@ -309,7 +309,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.)
@@ -321,7 +321,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/trunk/ps/ps.map/get_scalebar.c
===================================================================
--- grass/trunk/ps/ps.map/get_scalebar.c	2011-09-27 09:03:37 UTC (rev 48490)
+++ grass/trunk/ps/ps.map/get_scalebar.c	2011-09-27 09:55:28 UTC (rev 48491)
@@ -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/trunk/ps/ps.map/getgrid.c
===================================================================
--- grass/trunk/ps/ps.map/getgrid.c	2011-09-27 09:03:37 UTC (rev 48490)
+++ grass/trunk/ps/ps.map/getgrid.c	2011-09-27 09:55:28 UTC (rev 48491)
@@ -18,6 +18,7 @@
     "cross	cross_size",
     "color      color",
     "numbers    # [color]",
+    "width      #"
     ""
 };
 
@@ -125,7 +126,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)"));
@@ -233,7 +234,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/trunk/ps/ps.map/ps_outline.c
===================================================================
--- grass/trunk/ps/ps.map/ps_outline.c	2011-09-27 09:03:37 UTC (rev 48490)
+++ grass/trunk/ps/ps.map/ps_outline.c	2011-09-27 09:55:28 UTC (rev 48491)
@@ -100,7 +100,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