diff --git a/examples/boxes/main.cpp b/examples/boxes/main.cpp index 7e49327c..740dceeb 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, gradient1 ); + box->setBorderGradients( gradient3, gradient3, gradient3, gradient1 ); box->setShape( 30, Qt::AbsoluteSize ); } diff --git a/src/nodes/QskBoxRendererEllipse.cpp b/src/nodes/QskBoxRendererEllipse.cpp index da4c1d55..a2ecbf98 100644 --- a/src/nodes/QskBoxRendererEllipse.cpp +++ b/src/nodes/QskBoxRendererEllipse.cpp @@ -704,6 +704,14 @@ namespace { constexpr auto corner = BottomRight; + if(j==0) + qDebug() << "first line:" << + c[ corner ].centerX + v.dx1( corner ) << + c[ corner ].centerY + v.dy1( corner ) << + c[ corner ].centerX + v.dx2( corner ) << + c[ corner ].centerY + v.dy2( corner ) << + borderMapBR.colorAt( j ); + linesBR[ j ].setLine( c[ corner ].centerX + v.dx1( corner ), c[ corner ].centerY + v.dy1( corner ), @@ -753,6 +761,8 @@ namespace qDebug() << "bottom:" << j << k; addAdditionalLines( x1BL, y1BL, x2BL, y2BL, x1BR, y1BR, x2BR, y2BR, borderMapBL.gradient(), linesBL + k ); + // ###: + linesBL[ k + 2 ].setLine( x1BR, y1BR, x2BR, y2BR, borderMapBR.colorAt( j ) ); } } @@ -844,15 +854,18 @@ namespace } #if 1 - if ( borderLines ) - { - const int k = 4 * numCornerLines; +// if ( borderLines ) +// { +// const int k = 4 * numCornerLines; - if ( orientation == Qt::Vertical ) - borderLines[ k ] = borderLines[ 0 ]; - else - borderLines[ 0 ] = borderLines[ k ]; - } +// if ( orientation == Qt::Vertical ) +// { +// borderLines[ k ] = borderLines[ 0 ]; +// qDebug() << "setting line" << k << "to line 0"; +// } +// else +// borderLines[ 0 ] = borderLines[ k ]; +// } #endif } @@ -1372,13 +1385,15 @@ void QskBoxRenderer::renderRectellipse( const QRectF& rect, { borderLineCount = 4 * ( stepCount + 1 ) + 1; - const int additionalLines = qMax( 0, -1 + const int additionalLines = qMax( 0, 0 + additionalGradientStops( borderColors.gradient( Qsk::Left ) ) + additionalGradientStops( borderColors.gradient( Qsk::Top ) ) + additionalGradientStops( borderColors.gradient( Qsk::Right ) ) + additionalGradientStops( borderColors.gradient( Qsk::Bottom ) ) ); borderLineCount += additionalLines; + + qDebug() << "additional lines:" << additionalLines; } int lineCount = borderLineCount + fillLineCount;