conveniece methods ( without QTransform ) added

This commit is contained in:
Uwe Rathmann 2023-05-08 09:37:43 +02:00
parent 440a0f803d
commit 8f4d008900
2 changed files with 13 additions and 0 deletions

View File

@ -120,6 +120,11 @@ QskStrokeNode::RenderHint QskStrokeNode::renderHint() const
return ( material() == qskMaterialColorVertex ) ? Colored : Flat;
}
void QskStrokeNode::updateNode( const QPainterPath& path, const QPen& pen )
{
updateNode( path, QTransform(), pen );
}
void QskStrokeNode::updateNode(
const QPainterPath& path, const QTransform& transform, const QPen& pen )
{
@ -216,6 +221,12 @@ void QskStrokeNode::updateNode(
}
}
void QskStrokeNode::updateNode( const QPolygonF& polygon,
qreal lineWidth, const QColor& color )
{
updateNode( polygon, QTransform(), lineWidth, color );
}
/*
For polygons with a small lineWidth ( < 2 ) or a line without
connections we might get away with a simple and fast implementation

View File

@ -35,8 +35,10 @@ class QSK_EXPORT QskStrokeNode : public QSGGeometryNode
void setRenderHint( RenderHint );
RenderHint renderHint() const;
void updateNode( const QPainterPath&, const QPen& );
void updateNode( const QPainterPath&, const QTransform&, const QPen& );
void updateNode( const QPolygonF&, qreal lineWidth, const QColor& );
void updateNode( const QPolygonF&, const QTransform&,
qreal lineWidth, const QColor& );