reserving memory in advance
This commit is contained in:
parent
ca36a1705d
commit
3b683ba6d4
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user