From a638f876f123cb9c9d3540ce7ff184c097162480 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 19 Jul 2016 08:43:53 -0600 Subject: Fixed multidimensional floor spacing. --- src/renderpng.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/renderpng.cpp b/src/renderpng.cpp index 83f789a..dec0621 100644 --- a/src/renderpng.cpp +++ b/src/renderpng.cpp @@ -44,9 +44,17 @@ void RenderPng::render() for( int j = 2; j < iDims; j++ ) { if( j%2 == 0 ) - aiPixDims[j] = iBufHeight = rMap.getSize( j )*(iBufHeight+iFloorSpacing); + { + aiPixDims[j] = iBufHeight = rMap.getSize( j )*(iBufHeight+(j/2)*iFloorSpacing); +// if( j >= 4 ) +// iBufHeight += j*24; + } else - aiPixDims[j] = iBufWidth = rMap.getSize( j )*(iBufWidth+iFloorSpacing); + { + aiPixDims[j] = iBufWidth = rMap.getSize( j )*(iBufWidth+(j/2)*iFloorSpacing); +// if( j >= 4 ) +// iBufWidth += (j*24); + } } int ox = 0; int oy = 12; @@ -294,9 +302,17 @@ void RenderPng::render() for( int j = 2; j < iDims; j++ ) { if( j%2 == 0 ) + { oy += p[j]*aiPixDims[j-2]; + if( j >= 4 ) + oy += (p[j]*(j/2)*iFloorSpacing); + } else + { ox += p[j]*aiPixDims[j-2]; + if( j >= 4 ) + ox += (p[j]*(j/2)*iFloorSpacing); + } } oy += 12; } -- cgit v1.2.3