QskBoxRenderer::isGradientSupported also depends on the shape ( at least
in the future )
This commit is contained in:
parent
8551f4459d
commit
e1b65c6dd6
@ -83,7 +83,7 @@ void QskBoxNode::updateNode( const QRectF& rect,
|
||||
However the border is always done with a QskBoxRectangleNode
|
||||
*/
|
||||
|
||||
if ( QskBoxRenderer::isGradientSupported( gradient ) )
|
||||
if ( QskBoxRenderer::isGradientSupported( shape, gradient ) )
|
||||
{
|
||||
rectNode = qskNode< QskBoxRectangleNode >( this, BoxRole );
|
||||
rectNode->updateNode( rect, shape, borderMetrics, borderColors, gradient );
|
||||
|
@ -29,7 +29,7 @@ class QSK_EXPORT QskBoxRenderer
|
||||
const QskBoxShapeMetrics&, const QskBoxBorderMetrics&,
|
||||
const QskBoxBorderColors&, const QskGradient&, QSGGeometry& );
|
||||
|
||||
static bool isGradientSupported( const QskGradient& );
|
||||
static bool isGradientSupported( const QskBoxShapeMetrics&, const QskGradient& );
|
||||
|
||||
class Metrics
|
||||
{
|
||||
|
@ -663,7 +663,8 @@ void QskBoxRenderer::renderRectFill( const QskVertex::Quad& rect,
|
||||
qskCreateFillOrdered( rect, gradient, line );
|
||||
}
|
||||
|
||||
bool QskBoxRenderer::isGradientSupported( const QskGradient& gradient )
|
||||
bool QskBoxRenderer::isGradientSupported(
|
||||
const QskBoxShapeMetrics&, const QskGradient& gradient )
|
||||
{
|
||||
if ( !gradient.isVisible() || gradient.isMonochrome() )
|
||||
return true;
|
||||
|
@ -128,7 +128,7 @@ void QskRectangleNode::updateNode(
|
||||
d->rect = rect;
|
||||
d->shape = effectiveShape;
|
||||
|
||||
if ( QskBoxRenderer::isGradientSupported( effectiveGradient ) )
|
||||
if ( QskBoxRenderer::isGradientSupported( effectiveShape, effectiveGradient ) )
|
||||
{
|
||||
if ( material() != qskMaterialColorVertex )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user