Skip to content
Permalink
Browse files

render polylines with drawPath too (followup 08185c9; fixes #13343)

(cherry picked from commit c6460a3)
  • Loading branch information
jef-n committed Nov 25, 2015
1 parent 62591d9 commit dbe30f9cb49df22c9bdcb53f2f8bd82b5496496a
Showing with 21 additions and 1 deletion.
  1. +21 −1 src/core/symbology-ng/qgslinesymbollayerv2.cpp
@@ -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
}
}
}

0 comments on commit dbe30f9

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