Skip to content

Commit

Permalink
Merge pull request #2288 from nirvn/labelling_fix_fill_rule
Browse files Browse the repository at this point in the history
[labelling] set fill rule of qpainterpath for text/buffer rendering
  • Loading branch information
nyalldawson committed Sep 4, 2015
2 parents 1ad2b76 + 2856981 commit e374f38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgspallabeling.cpp
Expand Up @@ -4802,6 +4802,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 @@ -4870,6 +4871,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 e374f38

Please sign in to comment.