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 QSGRECTANGLENODE_H |
5 | #define QSGRECTANGLENODE_H |
6 | |
7 | #include <QtQuick/qsgnode.h> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class Q_QUICK_EXPORT QSGRectangleNode : public QSGGeometryNode |
12 | { |
13 | public: |
14 | ~QSGRectangleNode() override = default; |
15 | |
16 | virtual void setRect(const QRectF &rect) = 0; |
17 | inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); } |
18 | virtual QRectF rect() const = 0; |
19 | |
20 | virtual void setColor(const QColor &color) = 0; |
21 | virtual QColor color() const = 0; |
22 | }; |
23 | |
24 | QT_END_NAMESPACE |
25 | |
26 | #endif // QSGRECTANGLENODE_H |
27 | |