Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[composer] Force vector rendering of shape and page symbology (fix #1…
  • Loading branch information
nyalldawson committed Jun 18, 2014
1 parent 7af7b88 commit d06a1fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -1454,6 +1454,7 @@ void QgsComposerMap::drawGrid( QPainter* p )
ms.setExtent( *currentMapExtent() );
ms.setOutputDpi( p->device()->logicalDpiX() );
QgsRenderContext context = QgsRenderContext::fromMapSettings( ms );
context.setForceVectorOutput( true );
context.setPainter( p );

//simpler approach: draw vertical lines first, then horizontal ones
Expand Down Expand Up @@ -2581,6 +2582,7 @@ void QgsComposerMap::drawOverviewMapExtent( QPainter* p )
ms.setExtent( *currentMapExtent() );
ms.setOutputDpi( p->device()->logicalDpiX() );
QgsRenderContext context = QgsRenderContext::fromMapSettings( ms );
context.setForceVectorOutput( true );
context.setPainter( p );

p->save();
Expand Down
1 change: 1 addition & 0 deletions src/core/composer/qgscomposershape.cpp
Expand Up @@ -175,6 +175,7 @@ void QgsComposerShape::drawShapeUsingSymbol( QPainter* p )
ms.setOutputDpi( p->device()->logicalDpiX() );
QgsRenderContext context = QgsRenderContext::fromMapSettings( ms );
context.setPainter( p );
context.setForceVectorOutput( true );
p->scale( 1 / dotsPerMM, 1 / dotsPerMM ); // scale painter from mm to dots

//generate polygon to draw
Expand Down
1 change: 1 addition & 0 deletions src/core/composer/qgspaperitem.cpp
Expand Up @@ -163,6 +163,7 @@ void QgsPaperItem::paint( QPainter* painter, const QStyleOptionGraphicsItem* ite
ms.setOutputDpi( painter->device()->logicalDpiX() );
QgsRenderContext context = QgsRenderContext::fromMapSettings( ms );
context.setPainter( painter );
context.setForceVectorOutput( true );

painter->save();

Expand Down

0 comments on commit d06a1fe

Please sign in to comment.