Skip to content

Commit

Permalink
Rendering to QPixmap supports antialiasing nowadays
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15324 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Mar 3, 2011
1 parent 50b4cd0 commit f050a0d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gui/qgsmapcanvasmap.cpp
Expand Up @@ -61,11 +61,6 @@ void QgsMapCanvasMap::setPanningOffset( const QPoint& point )

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
Expand Down Expand Up @@ -99,6 +94,11 @@ void QgsMapCanvasMap::render()
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();
}
Expand Down

0 comments on commit f050a0d

Please sign in to comment.