Skip to content
Permalink
Browse files

alignment better, avoid artifacts

git-svn-id: http://svn.osgeo.org/qgis/trunk@15423 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 10, 2011
1 parent 51a07a6 commit f5b5efc71b36a29da8897b22c28e37841a7a28e9
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/providers/gdal/qgsgdalprovider.cpp
@@ -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;

0 comments on commit f5b5efc

Please sign in to comment.
You can’t perform that action at this time.