[QGIS Commit] r15324 - trunk/qgis/src/gui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Mar 3 15:08:00 EST 2011
Author: wonder
Date: 2011-03-03 12:08:00 -0800 (Thu, 03 Mar 2011)
New Revision: 15324
Modified:
trunk/qgis/src/gui/qgsmapcanvasmap.cpp
Log:
Rendering to QPixmap supports antialiasing nowadays
Modified: trunk/qgis/src/gui/qgsmapcanvasmap.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvasmap.cpp 2011-03-03 18:33:46 UTC (rev 15323)
+++ trunk/qgis/src/gui/qgsmapcanvasmap.cpp 2011-03-03 20:08:00 UTC (rev 15324)
@@ -61,11 +61,6 @@
void QgsMapCanvasMap::render()
{
- // Rendering to a QImage gives incorrectly filled polygons in some
- // cases (as at Qt4.1.4), but it is the only renderer that supports
- // anti-aliasing, so we provide the means to swap between QImage and
- // QPixmap.
-
if ( mUseQImageToRender )
{
// use temporary image for rendering
@@ -99,6 +94,11 @@
paint.begin( &mPixmap );
// Clip our drawing to the QPixmap
paint.setClipRect( mPixmap.rect() );
+
+ // antialiasing
+ if ( mAntiAliasing )
+ paint.setRenderHint( QPainter::Antialiasing );
+
mCanvas->mapRenderer()->render( &paint );
paint.end();
}
More information about the QGIS-commit
mailing list