1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QSGSIMPLERECTNODE_H |
5 | #define QSGSIMPLERECTNODE_H |
6 | |
7 | #include <QtQuick/qsgnode.h> |
8 | #include <QtQuick/qsgflatcolormaterial.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | class Q_QUICK_EXPORT QSGSimpleRectNode : public QSGGeometryNode |
13 | { |
14 | public: |
15 | QSGSimpleRectNode(const QRectF &rect, const QColor &color); |
16 | QSGSimpleRectNode(); |
17 | |
18 | void setRect(const QRectF &rect); |
19 | inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); } |
20 | QRectF rect() const; |
21 | |
22 | void setColor(const QColor &color); |
23 | QColor color() const; |
24 | |
25 | private: |
26 | QSGFlatColorMaterial m_material; |
27 | QSGGeometry m_geometry; |
28 | void *reserved; |
29 | }; |
30 | |
31 | QT_END_NAMESPACE |
32 | |
33 | #endif // SOLIDRECTNODE_H |
34 | |