crash fixed for square rectangles with mutiple stops at 0.5
This commit is contained in:
parent
b36521b0ed
commit
334254caf8
|
@ -114,12 +114,7 @@ namespace
|
||||||
{
|
{
|
||||||
const auto v = it.value();
|
const auto v = it.value();
|
||||||
|
|
||||||
if ( v == 0.5 )
|
if ( v <= 0.5 )
|
||||||
{
|
|
||||||
// this line is also a contour line, so we can skip it
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if ( v < 0.5 )
|
|
||||||
{
|
{
|
||||||
const qreal dt = m_rect.width * 2 * v;
|
const qreal dt = m_rect.width * 2 * v;
|
||||||
|
|
||||||
|
@ -559,16 +554,11 @@ void QskBoxRenderer::renderRect( const QRectF& rect,
|
||||||
|
|
||||||
if ( gradient.linearDirection().isTilted() )
|
if ( gradient.linearDirection().isTilted() )
|
||||||
{
|
{
|
||||||
if ( in.width == in.height )
|
// extra lines for the corners
|
||||||
{
|
|
||||||
if ( !gradient.hasStopAt( 0.5 ) )
|
fillLineCount++;
|
||||||
fillLineCount++;
|
if ( in.width != in.height )
|
||||||
}
|
fillLineCount++;
|
||||||
else
|
|
||||||
{
|
|
||||||
// we might need extra lines for the corners
|
|
||||||
fillLineCount += 2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue