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 QSGDEFAULTNINEPATCHNODE_P_H |
5 | #define QSGDEFAULTNINEPATCHNODE_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <private/qtquickglobal_p.h> |
19 | #include <QtQuick/qsgninepatchnode.h> |
20 | #include <QtQuick/qsggeometry.h> |
21 | #include <QtQuick/qsgtexturematerial.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class Q_QUICK_PRIVATE_EXPORT QSGDefaultNinePatchNode : public QSGNinePatchNode |
26 | { |
27 | public: |
28 | QSGDefaultNinePatchNode(); |
29 | ~QSGDefaultNinePatchNode(); |
30 | |
31 | void setTexture(QSGTexture *texture) override; |
32 | void setBounds(const QRectF &bounds) override; |
33 | void setDevicePixelRatio(qreal ratio) override; |
34 | void setPadding(qreal left, qreal top, qreal right, qreal bottom) override; |
35 | void update() override; |
36 | |
37 | private: |
38 | QRectF m_bounds; |
39 | qreal m_devicePixelRatio; |
40 | QVector4D m_padding; |
41 | QSGGeometry m_geometry; |
42 | QSGTextureMaterial m_material; |
43 | }; |
44 | |
45 | QT_END_NAMESPACE |
46 | |
47 | #endif // QSGDEFAULTNINEPATCHNODE_P_H |
48 | |