lineCount fixed ( clip nodes ended up with a final line with random

coordinates )
This commit is contained in:
Uwe Rathmann 2022-07-18 16:27:22 +02:00
parent d7d90a9dc8
commit 55b2235d18
1 changed files with 10 additions and 1 deletions

View File

@ -1315,9 +1315,18 @@ void QskBoxRenderer::renderRectellipseFill(
const int stepCount = metrics.corner[ 0 ].stepCount;
int lineCount = 2 * ( stepCount + 1 );
int lineCount = 2 * stepCount;
if ( metrics.centerQuad.top >= metrics.centerQuad.bottom )
{
// we need an extra line connecting the top/bottom corners
lineCount++;
}
else
{
// for some reason we have 2 more lines for true ellipses ??
lineCount += 2;
}
const auto line = allocateLines< Line >( geometry, lineCount );
qskRenderFillLines( metrics, Qt::Vertical, line, ColorMapNone() );