Skip to content

Commit

Permalink
Feature #8725: drawConvexPolygon() can be faster
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ahuarte47 committed Dec 17, 2013
1 parent b31a13e commit 4f8e7e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgssymbollayerv2.cpp
Expand Up @@ -361,7 +361,7 @@ void QgsFillSymbolLayerV2::_renderPolygon( QPainter* p, const QPolygonF& points,
if ( points.size()<=5 && QgsFeatureRequest::canbeGeneralizedByWndBoundingBox( points, context.layer() ? context.layer()->simplifyDrawingTol() : QgsFeatureRequest::MAPTOPIXEL_THRESHOLD_DEFAULT ) && p->renderHints() & QPainter::Antialiasing )
{
p->setRenderHint( QPainter::Antialiasing, false );
p->drawPolygon( points );
p->drawConvexPolygon( points );
p->setRenderHint( QPainter::Antialiasing, true );
return;
}
Expand Down

0 comments on commit 4f8e7e0

Please sign in to comment.