Skip to content

Commit 4f8e7e0

Browse files
committed
Feature #8725: drawConvexPolygon() can be faster
On some platforms (e.g. X11), the drawConvexPolygon() function can be faster than the drawPolygon() function. https://qt-project.org/doc/qt-4.8/qpainter.html#drawConvexPolygon
1 parent b31a13e commit 4f8e7e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/symbology-ng/qgssymbollayerv2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ void QgsFillSymbolLayerV2::_renderPolygon( QPainter* p, const QPolygonF& points,
361361
if ( points.size()<=5 && QgsFeatureRequest::canbeGeneralizedByWndBoundingBox( points, context.layer() ? context.layer()->simplifyDrawingTol() : QgsFeatureRequest::MAPTOPIXEL_THRESHOLD_DEFAULT ) && p->renderHints() & QPainter::Antialiasing )
362362
{
363363
p->setRenderHint( QPainter::Antialiasing, false );
364-
p->drawPolygon( points );
364+
p->drawConvexPolygon( points );
365365
p->setRenderHint( QPainter::Antialiasing, true );
366366
return;
367367
}

0 commit comments

Comments
 (0)