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 QSGDEFAULTIMAGENODE_P_H |
5 | #define QSGDEFAULTIMAGENODE_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 <QtQuick/private/qtquickglobal_p.h> |
19 | #include <QtQuick/qsgimagenode.h> |
20 | #include <QtQuick/qsggeometry.h> |
21 | #include <QtQuick/qsgtexturematerial.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class Q_QUICK_PRIVATE_EXPORT QSGDefaultImageNode : public QSGImageNode |
26 | { |
27 | public: |
28 | QSGDefaultImageNode(); |
29 | ~QSGDefaultImageNode(); |
30 | |
31 | void setRect(const QRectF &rect) override; |
32 | QRectF rect() const override; |
33 | |
34 | void setSourceRect(const QRectF &r) override; |
35 | QRectF sourceRect() const override; |
36 | |
37 | void setTexture(QSGTexture *texture) override; |
38 | QSGTexture *texture() const override; |
39 | |
40 | void setFiltering(QSGTexture::Filtering filtering) override; |
41 | QSGTexture::Filtering filtering() const override; |
42 | |
43 | void setMipmapFiltering(QSGTexture::Filtering filtering) override; |
44 | QSGTexture::Filtering mipmapFiltering() const override; |
45 | |
46 | void setAnisotropyLevel(QSGTexture::AnisotropyLevel level) override; |
47 | QSGTexture::AnisotropyLevel anisotropyLevel() const override; |
48 | |
49 | void setTextureCoordinatesTransform(TextureCoordinatesTransformMode mode) override; |
50 | TextureCoordinatesTransformMode textureCoordinatesTransform() const override; |
51 | |
52 | void setOwnsTexture(bool owns) override; |
53 | bool ownsTexture() const override; |
54 | |
55 | private: |
56 | QSGGeometry m_geometry; |
57 | QSGOpaqueTextureMaterial m_opaque_material; |
58 | QSGTextureMaterial m_material; |
59 | QRectF m_rect; |
60 | QRectF m_sourceRect; |
61 | QSize m_textureSize; |
62 | TextureCoordinatesTransformMode m_texCoordMode; |
63 | uint m_isAtlasTexture : 1; |
64 | uint m_ownsTexture : 1; |
65 | }; |
66 | |
67 | QT_END_NAMESPACE |
68 | |
69 | #endif // QSGDEFAULTIMAGENODE_P_H |
70 |