Skip to content

Commit c6460a3

Browse files
committed
render polylines with drawPath too (followup 08185c9; fixes #13343)
1 parent 79640ef commit c6460a3

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/core/symbology-ng/qgslinesymbollayerv2.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,21 +310,41 @@ void QgsSimpleLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym
310310
( p->renderHints() & QPainter::Antialiasing ) )
311311
{
312312
p->setRenderHint( QPainter::Antialiasing, false );
313+
#if 0
313314
p->drawPolyline( points );
315+
#else
316+
QPainterPath path;
317+
path.addPolygon( points );
318+
p->drawPath( path );
319+
#endif
314320
p->setRenderHint( QPainter::Antialiasing, true );
315321
return;
316322
}
317323

318324
if ( qgsDoubleNear( offset, 0 ) )
319325
{
326+
#if 0
320327
p->drawPolyline( points );
328+
#else
329+
QPainterPath path;
330+
path.addPolygon( points );
331+
p->drawPath( path );
332+
#endif
321333
}
322334
else
323335
{
324336
double scaledOffset = QgsSymbolLayerV2Utils::convertToPainterUnits( context.renderContext(), offset, mOffsetUnit, mOffsetMapUnitScale );
325337
QList<QPolygonF> mline = ::offsetLine( points, scaledOffset, context.feature() ? context.feature()->constGeometry()->type() : QGis::Line );
326338
for ( int part = 0; part < mline.count(); ++part )
327-
p->drawPolyline( mline[ part ] );
339+
{
340+
#if 0
341+
p->drawPolyline( mline );
342+
#else
343+
QPainterPath path;
344+
path.addPolygon( mline[ part ] );
345+
p->drawPath( path );
346+
#endif
347+
}
328348
}
329349
}
330350

0 commit comments

Comments
 (0)