QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskLinesNode.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_LINES_NODE_H
7#define QSK_LINES_NODE_H
8
9#include "QskBasicLinesNode.h"
10#include <qvector.h>
11
12class QskIntervalF;
14class QTransform;
15class QPointF;
16class QLineF;
17class QPolygonF;
18
19/*
20 A node for stippled or solid lines.
21 For the moment limited to horizontal/vertical lines: TODO
22 */
23class QSK_EXPORT QskLinesNode : public QskBasicLinesNode
24{
26
27 public:
29 ~QskLinesNode() override;
30
31 void updateGrid( const QColor&, qreal lineWidth,
32 const QskStippleMetrics&, const QTransform&, const QRectF&,
33 const QVector< qreal >&, const QVector< qreal >& );
34
35 void updateRect( const QColor&, qreal lineWidth,
36 const QskStippleMetrics&, const QTransform&, const QRectF& );
37
38 void updateLine( const QColor&, qreal lineWidth,
39 const QPointF&, const QPointF& );
40
41 void updateLine( const QColor&, qreal lineWidth,
42 const QskStippleMetrics&, const QTransform&,
43 const QPointF&, const QPointF& );
44
45 void updateLines( const QColor&, qreal lineWidth, const QVector< QLineF >& );
46
47 void updateLines( const QColor&, qreal lineWidth,
48 const QskStippleMetrics&, const QTransform&, const QVector< QLineF >& );
49
50 void updatePolygon( const QColor&, qreal lineWidth,
51 const QTransform&, const QPolygonF& );
52
53 private:
54 void updateLines( const QColor&, qreal lineWidth, const QskStippleMetrics&,
55 const QTransform&, int count, const QLineF* );
56
57 void updateGeometry( const QskStippleMetrics&, const QTransform&,
58 int count, const QLineF* );
59
60 void updateGeometry(
61 const QskStippleMetrics&, const QTransform&, const QRectF&,
62 const QVector< qreal >&, const QVector< qreal >& );
63
64 QSGGeometry::Point2D* setSolidLines(
65 Qt::Orientation, qreal, qreal,
66 const QTransform&, int count, const qreal* values,
67 QSGGeometry::Point2D* ) const;
68
69 QSGGeometry::Point2D* setStippledLines(
70 Qt::Orientation, qreal, qreal,
71 const QTransform&, int count, const qreal* values,
72 const QskStippleMetrics&, QSGGeometry::Point2D* ) const;
73
74 QskHashValue m_hash = 0.0;
75};
76
77#endif