Skip to content

Commit

Permalink
Fix for white stripes between raster tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Oct 5, 2012
1 parent fa06fc3 commit efb2329
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/core/raster/qgsrasterdrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ void QgsRasterDrawer::drawImage( QPainter* p, QgsRasterViewPort* viewPort, const

//top left position in device coords
QPoint tlPoint = QPoint( viewPort->topLeftPoint.x() + topLeftCol, viewPort->topLeftPoint.y() + topLeftRow );

p->save();
p->setRenderHint( QPainter::Antialiasing, false );
p->drawImage( tlPoint, img );
p->restore();
}

2 changes: 1 addition & 1 deletion tests/src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ ADD_PYTHON_TEST(PyQgsSpatialIndex test_qgsspatialindex.py)
ADD_PYTHON_TEST(PyQgsComposerHtml test_qgscomposerhtml.py)
ADD_PYTHON_TEST(PyQgsComposition test_qgscomposition.py)
ADD_PYTHON_TEST(PyQgsAnalysis test_qgsanalysis.py)
#ADD_PYTHON_TEST(PyQgsComposerMap test_qgscomposermap.py)
ADD_PYTHON_TEST(PyQgsComposerMap test_qgscomposermap.py)
ADD_PYTHON_TEST(PyQgsSymbolLayerV2 test_qgssymbollayerv2.py)
ADD_PYTHON_TEST(PyQgsPoint test_qgspoint.py)
4 changes: 2 additions & 2 deletions tests/src/python/qgscompositionchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ def compareImages( self, imgExpected, imgRendered, differenceImagePath ):

#allow pixel deviation of 1 percent
pixelCount = imageWidth * imageHeight;
# print "MismatchCount: "+str(mismatchCount)
# print "PixelCount: "+str(pixelCount)
print "MismatchCount: "+str(mismatchCount)
print "PixelCount: "+str(pixelCount)
return (float(mismatchCount) / float(pixelCount) ) < 0.01
12 changes: 12 additions & 0 deletions tests/src/python/test_qgscomposermap.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ def testOverviewMap(self):
# print "new "+str(newId)
# assert oldId != newId

def zebraStyle(self):
mComposerMap.setGridFrameStyle( QgsComposerMap.Zebra )
mComposerMap.setGridEnabled( True )
myPngPath = os.path.join(TEST_DATA_DIR,
"control_images",
"expected_composermap",
"composermap_zebra_style.png")
testResult = checker.testComposition("Composer map zebra",
self.mComposition,
myPngPath)
assert testResult == True

if __name__ == '__main__':
unittest.main()

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit efb2329

Please sign in to comment.