Skip to content

Commit f050a0d

Browse files
author
wonder
committed
Rendering to QPixmap supports antialiasing nowadays
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15324 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 50b4cd0 commit f050a0d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/gui/qgsmapcanvasmap.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ void QgsMapCanvasMap::setPanningOffset( const QPoint& point )
6161

6262
void QgsMapCanvasMap::render()
6363
{
64-
// Rendering to a QImage gives incorrectly filled polygons in some
65-
// cases (as at Qt4.1.4), but it is the only renderer that supports
66-
// anti-aliasing, so we provide the means to swap between QImage and
67-
// QPixmap.
68-
6964
if ( mUseQImageToRender )
7065
{
7166
// use temporary image for rendering
@@ -99,6 +94,11 @@ void QgsMapCanvasMap::render()
9994
paint.begin( &mPixmap );
10095
// Clip our drawing to the QPixmap
10196
paint.setClipRect( mPixmap.rect() );
97+
98+
// antialiasing
99+
if ( mAntiAliasing )
100+
paint.setRenderHint( QPainter::Antialiasing );
101+
102102
mCanvas->mapRenderer()->render( &paint );
103103
paint.end();
104104
}

0 commit comments

Comments
 (0)