QskBoxRenderer::isGradientSupported does not need the shape
This commit is contained in:
parent
ada3be71e0
commit
d6b9f4edc7
|
@ -172,7 +172,7 @@ QSGNode* GradientView::updatePaintNode(
|
||||||
shape.setRadius( 80 );
|
shape.setRadius( 80 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( !QskBoxRenderer::isGradientSupported( shape, m_gradient ) )
|
if ( !QskBoxRenderer::isGradientSupported( m_gradient ) )
|
||||||
{
|
{
|
||||||
delete oldNode;
|
delete oldNode;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -83,7 +83,7 @@ void QskBoxNode::updateNode( const QRectF& rect,
|
||||||
Note, that the border is always done with a QskBoxRectangleNode
|
Note, that the border is always done with a QskBoxRectangleNode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( QskBoxRenderer::isGradientSupported( shape, gradient ) )
|
if ( QskBoxRenderer::isGradientSupported( gradient ) )
|
||||||
{
|
{
|
||||||
rectNode = qskNode< QskBoxRectangleNode >( this, BoxRole );
|
rectNode = qskNode< QskBoxRectangleNode >( this, BoxRole );
|
||||||
rectNode->updateNode( rect, shape, borderMetrics, borderColors, gradient );
|
rectNode->updateNode( rect, shape, borderMetrics, borderColors, gradient );
|
||||||
|
|
|
@ -67,8 +67,7 @@ static inline bool qskMaybeSpreading( const QskGradient& gradient )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QskBoxRenderer::isGradientSupported(
|
bool QskBoxRenderer::isGradientSupported( const QskGradient& gradient )
|
||||||
const QskBoxShapeMetrics&, const QskGradient& gradient )
|
|
||||||
{
|
{
|
||||||
if ( !gradient.isVisible() || gradient.isMonochrome() )
|
if ( !gradient.isVisible() || gradient.isMonochrome() )
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace QskBoxRenderer
|
||||||
Filling the geometry usually with color information:
|
Filling the geometry usually with color information:
|
||||||
see QSGGeometry::defaultAttributes_ColoredPoint2D()
|
see QSGGeometry::defaultAttributes_ColoredPoint2D()
|
||||||
*/
|
*/
|
||||||
QSK_EXPORT bool isGradientSupported( const QskBoxShapeMetrics&, const QskGradient& );
|
QSK_EXPORT bool isGradientSupported( const QskGradient& );
|
||||||
|
|
||||||
QSK_EXPORT void renderBox( const QRectF&,
|
QSK_EXPORT void renderBox( const QRectF&,
|
||||||
const QskBoxShapeMetrics&, const QskBoxBorderMetrics&,
|
const QskBoxShapeMetrics&, const QskBoxBorderMetrics&,
|
||||||
|
|
|
@ -72,7 +72,7 @@ void QskRectangleNode::updateNode(
|
||||||
d->rect = rect;
|
d->rect = rect;
|
||||||
d->shape = effectiveShape;
|
d->shape = effectiveShape;
|
||||||
|
|
||||||
if ( QskBoxRenderer::isGradientSupported( effectiveShape, effectiveGradient ) )
|
if ( QskBoxRenderer::isGradientSupported( effectiveGradient ) )
|
||||||
{
|
{
|
||||||
setColoring( Polychrome );
|
setColoring( Polychrome );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue