Skip to content

Commit

Permalink
alignment better, avoid artifacts
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15423 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Mar 10, 2011
1 parent a7862ec commit 4bd9f3a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -670,6 +670,11 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent,
int topAddPixels = static_cast<int> ( round( topSpace / yRes ) );

QgsDebugMsg( QString("xAddPixels = %1 yAddPixels = %2 leftAddPixels = %3 topAddPixels = %4").arg(xAddPixels).arg(yAddPixels).arg(leftAddPixels).arg(topAddPixels) );
// Currently only positive allowed, verify if negative has sense and check following use
xAddPixels = xAddPixels > 0 ? xAddPixels : 0;
yAddPixels = yAddPixels > 0 ? yAddPixels : 0;
leftAddPixels = leftAddPixels > 0 ? leftAddPixels : 0;
topAddPixels = topAddPixels > 0 ? topAddPixels : 0;

int totalWidth = width + xAddPixels;
int totalHeight = height + yAddPixels;
Expand Down

0 comments on commit 4bd9f3a

Please sign in to comment.