Skip to content

Commit

Permalink
[labelling] set full rule of qpainterpath for text/buffer rendering
Browse files Browse the repository at this point in the history
(cherry-picked from 2856981)
  • Loading branch information
nyalldawson committed Nov 18, 2015
1 parent cfc32e1 commit bce210e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgspallabeling.cpp
Expand Up @@ -4458,6 +4458,7 @@ void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext& con
{
// draw label's text, QPainterPath method
QPainterPath path;
path.setFillRule( Qt::WindingFill );
path.addText( 0, 0, tmpLyr.textFont, component.text() );

// store text's drawing in QPicture for drop shadow call
Expand Down Expand Up @@ -4526,6 +4527,7 @@ void QgsPalLabeling::drawLabelBuffer( QgsRenderContext& context,
( tmpLyr.bufferSizeInMapUnits ? QgsPalLayerSettings::MapUnits : QgsPalLayerSettings::MM ), true, tmpLyr.bufferSizeMapUnitScale );

QPainterPath path;
path.setFillRule( Qt::WindingFill );
path.addText( 0, 0, tmpLyr.textFont, component.text() );
QPen pen( tmpLyr.bufferColor );
pen.setWidthF( penSize );
Expand Down

0 comments on commit bce210e

Please sign in to comment.