Skip to content

Commit

Permalink
render polylines with drawPath too (followup 08185c9; fixes #13343)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Nov 20, 2015
1 parent 79640ef commit c6460a3
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/core/symbology-ng/qgslinesymbollayerv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,21 +310,41 @@ void QgsSimpleLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym
( p->renderHints() & QPainter::Antialiasing ) )
{
p->setRenderHint( QPainter::Antialiasing, false );
#if 0
p->drawPolyline( points );
#else
QPainterPath path;
path.addPolygon( points );
p->drawPath( path );
#endif
p->setRenderHint( QPainter::Antialiasing, true );
return;
}

if ( qgsDoubleNear( offset, 0 ) )
{
#if 0
p->drawPolyline( points );
#else
QPainterPath path;
path.addPolygon( points );
p->drawPath( path );
#endif
}
else
{
double scaledOffset = QgsSymbolLayerV2Utils::convertToPainterUnits( context.renderContext(), offset, mOffsetUnit, mOffsetMapUnitScale );
QList<QPolygonF> mline = ::offsetLine( points, scaledOffset, context.feature() ? context.feature()->constGeometry()->type() : QGis::Line );
for ( int part = 0; part < mline.count(); ++part )
p->drawPolyline( mline[ part ] );
{
#if 0
p->drawPolyline( mline );
#else
QPainterPath path;
path.addPolygon( mline[ part ] );
p->drawPath( path );
#endif
}
}
}

Expand Down

0 comments on commit c6460a3

Please sign in to comment.