interpolation between monochrome gradients improved

This commit is contained in:
Uwe Rathmann 2022-03-29 11:14:23 +02:00
parent 94a7ae4509
commit 848a22b2a2

View File

@ -499,6 +499,14 @@ QskGradient QskGradient::interpolated(
return QskGradient( gradient->orientation(), stops ); return QskGradient( gradient->orientation(), stops );
} }
if ( isMonochrome() && to.isMonochrome() )
{
const auto c = QskRgb::interpolated(
m_stops[ 0 ].color(), to.m_stops[ 0 ].color(), value );
return QskGradient( to.orientation(), c, c );
}
if ( isMonochrome() ) if ( isMonochrome() )
{ {
// we can ignore our stops // we can ignore our stops