Skip to content
Permalink
Browse files

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
  • Loading branch information
ahuarte47 committed Oct 27, 2013
1 parent 775a8e8 commit c9fccbd0107c938c78db0024ba88310d154aabcd
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/symbology-ng/qgssymbollayerv2.cpp
@@ -335,7 +335,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;
}

0 comments on commit c9fccbd

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