Skip to content

Commit f48238f

Browse files
committed
#8725: drawRect faster drawConvexPolygon
1 parent 1201008 commit f48238f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/symbology-ng/qgssymbollayerv2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ void QgsFillSymbolLayerV2::_renderPolygon( QPainter* p, const QPolygonF& points,
360360
// Disable 'Antialiasing' if the geometry was generalized in the current RenderContext (We known that it must have least #5 points).
361361
if ( points.size()<=5 && context.layer() && context.layer()->simplifyDrawingCanbeApplied( QgsVectorLayer::AntialiasingSimplification ) && QgsFeatureRequest::canbeGeneralizedByWndBoundingBox( points, context.layer()->simplifyDrawingTol() ) && p->renderHints() & QPainter::Antialiasing )
362362
{
363-
p->setRenderHint( QPainter::Antialiasing, false );
364-
p->drawConvexPolygon( points );
363+
p->setRenderHint( QPainter::Antialiasing, false );
364+
p->drawRect( points.boundingRect() );
365365
p->setRenderHint( QPainter::Antialiasing, true );
366366
return;
367367
}

0 commit comments

Comments
 (0)