qskinny/src/nodes/QskStrokeNode.h

51 lines
1.3 KiB
C
Raw Normal View History

/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
2023-04-06 07:23:37 +00:00
* SPDX-License-Identifier: BSD-3-Clause
*****************************************************************************/
#ifndef QSK_STROKE_NODE_H
#define QSK_STROKE_NODE_H
#include "QskGlobal.h"
#include <qsgnode.h>
class QPen;
class QPainterPath;
class QPolygonF;
class QskStrokeNodePrivate;
class QSK_EXPORT QskStrokeNode : public QSGGeometryNode
{
public:
QskStrokeNode();
2023-05-17 12:21:40 +00:00
~QskStrokeNode() override;
/*
We only support monochrome pens ( QPen::color() ) and using a
QSGFlatColorMaterial is good enough. However QSGVertexColorMaterial
usually allows better batching. So Flat vs. Colored is a tradeoff
between memory and performance.
*/
enum RenderHint
{
Flat,
Colored
};
void setRenderHint( RenderHint );
RenderHint renderHint() const;
void updateNode( const QPainterPath&, const QPen& );
2022-09-29 15:26:15 +00:00
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& );
private:
Q_DECLARE_PRIVATE( QskStrokeNode )
};
#endif