From f48238f06f51b3ea6392666edae0f35514a4439a Mon Sep 17 00:00:00 2001 From: Alvaro Huarte Date: Thu, 21 Nov 2013 18:12:37 +0100 Subject: [PATCH] #8725: drawRect faster drawConvexPolygon --- src/core/symbology-ng/qgssymbollayerv2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/symbology-ng/qgssymbollayerv2.cpp b/src/core/symbology-ng/qgssymbollayerv2.cpp index 7a6f74b8b115..a6701697eab6 100644 --- a/src/core/symbology-ng/qgssymbollayerv2.cpp +++ b/src/core/symbology-ng/qgssymbollayerv2.cpp @@ -360,8 +360,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; }