QskBoxBorderColors interpolation fixed
This commit is contained in:
parent
ad67d035f3
commit
4c73c1fd7b
@ -188,8 +188,8 @@ QskBoxBorderColors QskBoxBorderColors::interpolated(
|
|||||||
the color and use always use the other color. TODO ...
|
the color and use always use the other color. TODO ...
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
auto& gradient = colors.m_gradients[ i ];
|
colors.m_gradients[ i ] =
|
||||||
gradient = gradient.interpolated( to.m_gradients[ i ], ratio );
|
m_gradients[ i ].interpolated( to.m_gradients[ i ], ratio );
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors;
|
return colors;
|
||||||
|
@ -319,9 +319,10 @@ QskGradient QskGradient::interpolated( const QskGradient& to, qreal ratio ) cons
|
|||||||
|
|
||||||
gradient = to;
|
gradient = to;
|
||||||
|
|
||||||
gradient.setStops( qskInterpolatedGradientStops(
|
const auto stops = qskInterpolatedGradientStops(
|
||||||
m_stops, isMonochrome(),
|
m_stops, isMonochrome(), to.m_stops, to.isMonochrome(), ratio );
|
||||||
to.m_stops, to.isMonochrome(), ratio ) );
|
|
||||||
|
gradient.setStops( stops );
|
||||||
|
|
||||||
for ( uint i = 0; i < sizeof( m_values ) / sizeof( m_values[0] ); i++ )
|
for ( uint i = 0; i < sizeof( m_values ) / sizeof( m_values[0] ); i++ )
|
||||||
gradient.m_values[i] = m_values[i] + ratio * ( to.m_values[i] - m_values[i] );
|
gradient.m_values[i] = m_values[i] + ratio * ( to.m_values[i] - m_values[i] );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user