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 );
QGradientStops stops;
stops.reserve( gradient.stops().count() );
for( const QskGradientStop& stop : qAsConst( gradient.stops() ) )
{
QGradientStop s( stop.position(), stop.color() );
stops.append( s );
}
stops += QGradientStop( stop.position(), stop.color() );
/*
horizontal is interpreted as in direction of the arc,