[GRASS-SVN] r30734 - grass/trunk/visualization/nviz/src
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 26 08:26:53 EDT 2008
Author: glynn
Date: 2008-03-26 08:26:53 -0400 (Wed, 26 Mar 2008)
New Revision: 30734
Modified:
grass/trunk/visualization/nviz/src/do_zoom.c
Log:
Don't create zero-width/height tiles
Modified: grass/trunk/visualization/nviz/src/do_zoom.c
===================================================================
--- grass/trunk/visualization/nviz/src/do_zoom.c 2008-03-26 12:15:41 UTC (rev 30733)
+++ grass/trunk/visualization/nviz/src/do_zoom.c 2008-03-26 12:26:53 UTC (rev 30734)
@@ -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