Skip to content
Permalink
Browse files

Rendering to QPixmap supports antialiasing nowadays

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15324 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Mar 3, 2011
1 parent 50b4cd0 commit f050a0d62359ab4a344cd0d478a0c7e3d82c41c6
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 f050a0d

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