File indexing completed on 2024-05-12 05:46:54

0001 /****************************************************************************
0002 **
0003 ** Copyright (C) 2016 The Qt Company Ltd.
0004 ** Contact: https://www.qt.io/licensing/
0005 **
0006 ** This file is part of the QtQuick module of the Qt Toolkit.
0007 **
0008 ** $QT_BEGIN_LICENSE:LGPL$
0009 ** Commercial License Usage
0010 ** Licensees holding valid commercial Qt licenses may use this file in
0011 ** accordance with the commercial license agreement provided with the
0012 ** Software or, alternatively, in accordance with the terms contained in
0013 ** a written agreement between you and The Qt Company. For licensing terms
0014 ** and conditions see https://www.qt.io/terms-conditions. For further
0015 ** information use the contact form at https://www.qt.io/contact-us.
0016 **
0017 ** GNU Lesser General Public License Usage
0018 ** Alternatively, this file may be used under the terms of the GNU Lesser
0019 ** General Public License version 3 as published by the Free Software
0020 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
0021 ** packaging of this file. Please review the following information to
0022 ** ensure the GNU Lesser General Public License version 3 requirements
0023 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
0024 **
0025 ** GNU General Public License Usage
0026 ** Alternatively, this file may be used under the terms of the GNU
0027 ** General Public License version 2.0 or (at your option) the GNU General
0028 ** Public license version 3 or any later version approved by the KDE Free
0029 ** Qt Foundation. The licenses are as published by the Free Software
0030 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
0031 ** included in the packaging of this file. Please review the following
0032 ** information to ensure the GNU General Public License requirements will
0033 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
0034 ** https://www.gnu.org/licenses/gpl-3.0.html.
0035 **
0036 ** $QT_END_LICENSE$
0037 **
0038 ****************************************************************************/
0039 
0040 #ifndef QSGDEFAULTNINEPATCHNODE_P_H
0041 #define QSGDEFAULTNINEPATCHNODE_P_H
0042 
0043 //
0044 //  W A R N I N G
0045 //  -------------
0046 //
0047 // This file is not part of the Qt API.  It exists purely as an
0048 // implementation detail.  This header file may change from version to
0049 // version without notice, or even be removed.
0050 //
0051 // We mean it.
0052 //
0053 
0054 //#include <private/qtquickglobal_p.h>
0055 #include "qsgninepatchnode.h"
0056 #include <QtQuick/qsggeometry.h>
0057 #include <QtQuick/qsgtexturematerial.h>
0058 
0059 QT_BEGIN_NAMESPACE
0060 
0061 class QSGDefaultNinePatchNode : public QSGNinePatchNode
0062 {
0063 public:
0064     QSGDefaultNinePatchNode();
0065     ~QSGDefaultNinePatchNode() override;
0066 
0067     void setTexture(QSGTexture *texture) override;
0068     void setBounds(const QRectF &bounds) override;
0069     void setDevicePixelRatio(qreal ratio) override;
0070     void setPadding(qreal left, qreal top, qreal right, qreal bottom) override;
0071     void update() override;
0072 
0073 private:
0074     QRectF m_bounds;
0075     qreal m_devicePixelRatio;
0076     QVector4D m_padding;
0077     QSGGeometry m_geometry;
0078     QSGTextureMaterial m_material;
0079 };
0080 
0081 QT_END_NAMESPACE
0082 
0083 #endif // QSGDEFAULTNINEPATCHNODE_P_H