[GRASS-SVN] r33104 - grass/trunk/lib/display
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 26 21:07:05 EDT 2008
Author: glynn
Date: 2008-08-26 21:07:05 -0400 (Tue, 26 Aug 2008)
New Revision: 33104
Modified:
grass/trunk/lib/display/cnversions.c
Log:
Fix bug in aspect fitting
Modified: grass/trunk/lib/display/cnversions.c
===================================================================
--- grass/trunk/lib/display/cnversions.c 2008-08-26 22:01:56 UTC (rev 33103)
+++ grass/trunk/lib/display/cnversions.c 2008-08-27 01:07:05 UTC (rev 33104)
@@ -90,18 +90,18 @@
if (fabs(conv.y) > fabs(conv.x)) {
scale = fabs(conv.y) / fabs(conv.x);
- size = rect->size.x * scale;
+ size = rect->size.x / scale;
delta = rect->size.x - size;
- rect->west -= delta/2;
- rect->east += delta/2;
+ rect->west += delta/2;
+ rect->east -= delta/2;
rect->size.x = size;
}
else {
scale = fabs(conv.x) / fabs(conv.y);
- size = rect->size.y * scale;
+ size = rect->size.y / scale;
delta = rect->size.y - size;
- rect->north -= delta/2;
- rect->south += delta/2;
+ rect->north += delta/2;
+ rect->south -= delta/2;
rect->size.y = size;
}
}
More information about the grass-commit
mailing list