qskEffectiveGradient fixed
This commit is contained in:
parent
65a733299b
commit
a2a2c63678
@ -44,31 +44,23 @@ static inline QskGradient qskEffectiveGradient( const QskGradient& gradient )
|
||||
{
|
||||
auto g = gradient.effectiveGradient();
|
||||
|
||||
switch( static_cast< int >( g.type() ) )
|
||||
if ( g.type() == QskGradient::Linear )
|
||||
{
|
||||
case QskGradient::Linear:
|
||||
auto dir = g.linearDirection();
|
||||
|
||||
if ( dir.isTilted() )
|
||||
{
|
||||
auto dir = gradient.linearDirection();
|
||||
dir.setStart( 0.0, 0.0 );
|
||||
dir.setStop( 1.0, 1.0 );
|
||||
|
||||
if ( dir.isTilted() )
|
||||
{
|
||||
dir.setStart( 0.0, 0.0 );
|
||||
dir.setStop( 1.0, 1.0 );
|
||||
|
||||
g.setLinearDirection( dir );
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case QskGradient::Radial:
|
||||
case QskGradient::Conic:
|
||||
{
|
||||
qWarning() << "QskBoxRectangleNode does not support radial/conic gradients";
|
||||
g.setDirection( QskGradient::Linear );
|
||||
|
||||
break;
|
||||
g.setLinearDirection( dir );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning() << "QskBoxRectangleNode does not support radial/conic gradients";
|
||||
g.setDirection( QskGradient::Linear );
|
||||
}
|
||||
|
||||
return g;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user