reserving memory in advance

This commit is contained in:
Uwe Rathmann 2022-03-24 17:13:09 +01:00
parent ca36a1705d
commit 3b683ba6d4

View File

@ -17,12 +17,10 @@ void QskArcRenderer::renderArc(const QRectF& rect,
painter->setRenderHint( QPainter::Antialiasing, true ); painter->setRenderHint( QPainter::Antialiasing, true );
QGradientStops stops; QGradientStops stops;
stops.reserve( gradient.stops().count() );
for( const QskGradientStop& stop : qAsConst( gradient.stops() ) ) for( const QskGradientStop& stop : qAsConst( gradient.stops() ) )
{ stops += QGradientStop( stop.position(), stop.color() );
QGradientStop s( stop.position(), stop.color() );
stops.append( s );
}
/* /*
horizontal is interpreted as in direction of the arc, horizontal is interpreted as in direction of the arc,