From 4670e3b5d3ec5dc6fd8a21e12316912888c8642c Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Thu, 22 Dec 2022 17:49:02 +0100 Subject: [PATCH] wrong vector size fixed --- src/nodes/QskGradientMaterial.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/nodes/QskGradientMaterial.cpp b/src/nodes/QskGradientMaterial.cpp index d4217f8c..8ecc7375 100644 --- a/src/nodes/QskGradientMaterial.cpp +++ b/src/nodes/QskGradientMaterial.cpp @@ -192,17 +192,13 @@ namespace changed = true; } -#if 0 - QTransform transform( rect.width(), 0, 0, rect.height(), rect.x(), rect.y()); -#endif - const auto dir = gradient.linearDirection(); const QVector4D vector( - rect.left() + dir.start().x() * rect.width(), - rect.top() + dir.start().y() * rect.height(), - dir.stop().x() * rect.width(), - dir.stop().y() * rect.height() ); + rect.left() + dir.x1() * rect.width(), + rect.top() + dir.y1() * rect.height(), + ( dir.x2() - dir.x1() ) * rect.width(), + ( dir.y2() - dir.y1() ) * rect.height() ); if ( m_gradientVector != vector ) {