Skip to content
Permalink
Browse files

#8725: drawRect faster drawConvexPolygon

  • Loading branch information
ahuarte47 committed Nov 21, 2013
1 parent 9e9a686 commit d2d8e4f783e73fddc67914451f14b647ab2b0809
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/symbology-ng/qgssymbollayerv2.cpp
@@ -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;
}

0 comments on commit d2d8e4f

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