code reorganized

This commit is contained in:
Uwe Rathmann 2022-09-26 14:44:06 +02:00
parent b2d7d77640
commit 96906e04ca
1 changed files with 3 additions and 4 deletions

View File

@ -50,19 +50,18 @@ void QskStrokeNode::updateNode( const QPainterPath& path, const QPen& pen )
if ( true ) // For the moment we always update the geometry. TODO ... if ( true ) // For the moment we always update the geometry. TODO ...
{ {
const QVectorPath& vectorPath = qtVectorPathForPath(path);
QTriangulatingStroker stroker; QTriangulatingStroker stroker;
if ( pen.style() == Qt::SolidLine ) if ( pen.style() == Qt::SolidLine )
{ {
// clipRect, renderHint are ignored in QTriangulatingStroker::process // clipRect, renderHint are ignored in QTriangulatingStroker::process
stroker.process( vectorPath, pen, {}, {} ); stroker.process( qtVectorPathForPath( path ), pen, {}, {} );
} }
else else
{ {
QDashedStrokeProcessor dashStroker; QDashedStrokeProcessor dashStroker;
dashStroker.process( vectorPath, pen, QRectF(), {} ); // empty rect: no clipping dashStroker.process( qtVectorPathForPath( path ),
pen, QRectF(), {} ); // empty rect: no clipping
const QVectorPath dashedVectorPath( dashStroker.points(), const QVectorPath dashedVectorPath( dashStroker.points(),
dashStroker.elementCount(), dashStroker.elementTypes(), 0 ); dashStroker.elementCount(), dashStroker.elementTypes(), 0 );