From c7aec57838774583e63423e69bfe05af28dee250 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 12 Jan 2022 11:48:04 +0100 Subject: [PATCH] something's off --- examples/boxes/main.cpp | 2 +- src/nodes/QskBoxRendererEllipse.cpp | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/examples/boxes/main.cpp b/examples/boxes/main.cpp index 778b9dc5..7e49327c 100644 --- a/examples/boxes/main.cpp +++ b/examples/boxes/main.cpp @@ -421,7 +421,7 @@ static void addColoredBorderRectangles6( QskLinearBox* parent ) { 1.0, Qt::black } } ); QskGradient gradient3( Qt::green ); QskGradient gradient4( Qt::Vertical, Qt::red, Qt::blue ); - box->setBorderGradients( gradient1, gradient2, gradient1, gradient3 ); + box->setBorderGradients( gradient1, gradient2, gradient1, gradient1 ); box->setShape( 30, Qt::AbsoluteSize ); } diff --git a/src/nodes/QskBoxRendererEllipse.cpp b/src/nodes/QskBoxRendererEllipse.cpp index fcc68fd8..da4c1d55 100644 --- a/src/nodes/QskBoxRendererEllipse.cpp +++ b/src/nodes/QskBoxRendererEllipse.cpp @@ -735,6 +735,25 @@ namespace addAdditionalLines( x1TR, y1TR, x2TR, y2TR, x1TL, y1TL, x2TL, y2TL, borderMapTR.gradient(), linesTR + k ); } + + if( additionalGradientStops( borderMapBL.gradient() ) > 0 ) + { + auto stops = borderMapBL.gradient().stops(); + + float x1BL = c[ BottomLeft ].centerX - v.dx1( BottomLeft ), + y1BL = c[ BottomLeft ].centerY + v.dy1( BottomLeft ), + x2BL = c[ BottomLeft ].centerX - v.dx2( BottomLeft ), + y2BL = c[ BottomLeft ].centerY + v.dy2( BottomLeft ), + + x1BR = c[ BottomRight ].centerX + v.dx1( BottomRight ), + y1BR = c[ BottomRight ].centerY + v.dy1( BottomRight ), + x2BR = c[ BottomRight ].centerX + v.dx2( BottomRight ), + y2BR = c[ BottomRight ].centerY + v.dy2( BottomRight ); + + qDebug() << "bottom:" << j << k; + addAdditionalLines( x1BL, y1BL, x2BL, y2BL, x1BR, y1BR, x2BR, y2BR, + borderMapBL.gradient(), linesBL + k ); + } } if( j == numCornerLines - 1 )