Skip to content
Permalink
Browse files

Rendering to QPixmap supports antialiasing nowadays

git-svn-id: http://svn.osgeo.org/qgis/trunk@15324 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Mar 3, 2011
1 parent e438941 commit 644d5e95b90c7ac265521d65da595532e5202d7a
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/gui/qgsmapcanvasmap.cpp
@@ -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
@@ -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();
}

0 comments on commit 644d5e9

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