#8725: drawRect faster drawConvexPolygon

This commit is contained in:
Alvaro Huarte 2013-11-21 18:12:37 +01:00
parent 9e9a686f99
commit d2d8e4f783

View File

@ -334,8 +334,8 @@ void QgsFillSymbolLayerV2::_renderPolygon( QPainter* p, const QPolygonF& points,
// Disable 'Antialiasing' if the geometry was generalized in the current RenderContext (We known that it must have least #5 points).
if ( points.size()<=5 && context.layer() && context.layer()->simplifyDrawingCanbeApplied( QgsVectorLayer::AntialiasingSimplification ) && QgsFeatureRequest::canbeGeneralizedByWndBoundingBox( points, context.layer()->simplifyDrawingTol() ) && p->renderHints() & QPainter::Antialiasing )
{
p->setRenderHint( QPainter::Antialiasing, false );
p->drawConvexPolygon( points );
p->setRenderHint( QPainter::Antialiasing, false );
p->drawRect( points.boundingRect() );
p->setRenderHint( QPainter::Antialiasing, true );
return;
}