[GRASS-SVN] r30735 -
grass/branches/releasebranch_6_3/visualization/nviz/src
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 26 08:30:11 EDT 2008
Author: neteler
Date: 2008-03-26 08:30:11 -0400 (Wed, 26 Mar 2008)
New Revision: 30735
Modified:
grass/branches/releasebranch_6_3/visualization/nviz/src/do_zoom.c
Log:
Don't create zero-width/height tiles (merge from HEAD)
Modified: grass/branches/releasebranch_6_3/visualization/nviz/src/do_zoom.c
===================================================================
--- grass/branches/releasebranch_6_3/visualization/nviz/src/do_zoom.c 2008-03-26 12:26:53 UTC (rev 30734)
+++ grass/branches/releasebranch_6_3/visualization/nviz/src/do_zoom.c 2008-03-26 12:30:11 UTC (rev 30735)
@@ -101,13 +101,13 @@
maxy = (int) (maxx / aspect) + 1;
else
maxy = (int) (maxx / aspect);
- var_i = (int) (maxx/(c-a)) + 1;
+ var_i = (maxx + (c-a) - 1)/(c-a);
} else {
if ( ( (maxy * aspect) - (int)(maxy * aspect) ) > .5)
maxx = (int) (maxy * aspect) + 1;
else
maxx = (int) (maxy * aspect);
- var_i = (int)(maxy/(d-b))+1;
+ var_i = (maxy + (d-b) - 1)/(d-b);
}
fprintf(stderr, "Final Assembled Image will be %d x %d\n", maxx, maxy);
More information about the grass-commit
mailing list