| 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 QSGNINEPATCHNODE_H |
| 5 | #define QSGNINEPATCHNODE_H |
| 6 | |
| 7 | #include <QtQuick/qsgnode.h> |
| 8 | #include <QtQuick/qsgtexture.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | class Q_QUICK_EXPORT QSGNinePatchNode : public QSGGeometryNode |
| 13 | { |
| 14 | public: |
| 15 | ~QSGNinePatchNode() override = default; |
| 16 | |
| 17 | virtual void setTexture(QSGTexture *texture) = 0; |
| 18 | virtual void setBounds(const QRectF &bounds) = 0; |
| 19 | virtual void setDevicePixelRatio(qreal ratio) = 0; |
| 20 | virtual void setPadding(qreal left, qreal top, qreal right, qreal bottom) = 0; |
| 21 | virtual void update() = 0; |
| 22 | |
| 23 | static void rebuildGeometry(QSGTexture *texture, QSGGeometry *geometry, |
| 24 | const QVector4D &padding, |
| 25 | const QRectF &bounds, qreal dpr); |
| 26 | }; |
| 27 | |
| 28 | QT_END_NAMESPACE |
| 29 | |
| 30 | #endif // QSGNINEPATCHNODE_H |
| 31 | |