Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qsgdefaultimagenode_p.h
Go to the documentation of this file.
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
24
25class Q_QUICK_PRIVATE_EXPORT QSGDefaultImageNode : public QSGImageNode
26{
27public:
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;
45
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
55private:
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
68
69#endif // QSGDEFAULTIMAGENODE_P_H
\inmodule QtCore\reentrant
Definition qrect.h:483
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
Definition qsggeometry.h:15
The QSGImageNode class is provided for convenience to easily draw textured content using the QML scen...
virtual void setOwnsTexture(bool owns)=0
Sets whether the node takes ownership of the texture to owns.
virtual void setSourceRect(const QRectF &r)=0
Sets the source rect of this image node to rect.
virtual void setFiltering(QSGTexture::Filtering filtering)=0
Sets the filtering to be used for this image node to filtering.
virtual void setTextureCoordinatesTransform(TextureCoordinatesTransformMode mode)=0
Sets the method used to generate texture coordinates to mode.
virtual QSGTexture::AnisotropyLevel anisotropyLevel() const =0
Returns this image node's anistropy level.
virtual QSGTexture::Filtering mipmapFiltering() const =0
Returns the mipmap filtering for this image node.
virtual QRectF rect() const =0
Returns the target rect of this image node.
virtual void setRect(const QRectF &rect)=0
Sets the target rect of this image node to rect.
virtual QSGTexture * texture() const =0
Returns the texture for this image node.
virtual QSGTexture::Filtering filtering() const =0
Returns the filtering for this image node.
virtual void setTexture(QSGTexture *texture)=0
Sets the texture of this image node to texture.
virtual bool ownsTexture() const =0
virtual void setMipmapFiltering(QSGTexture::Filtering filtering)=0
Sets the mipmap filtering to be used for this image node to filtering.
virtual TextureCoordinatesTransformMode textureCoordinatesTransform() const =0
Returns the mode used to generate texture coordinates for this node.
virtual void setAnisotropyLevel(QSGTexture::AnisotropyLevel level)=0
Sets this image node's anistropy level to level.
virtual QRectF sourceRect() const =0
Returns the source rect of this image node.
The QSGOpaqueTextureMaterial class provides a convenient way of rendering textured geometry in the sc...
The QSGTextureMaterial class provides a convenient way of rendering textured geometry in the scene gr...
\inmodule QtQuick
Definition qsgtexture.h:20
Filtering
Specifies how sampling of texels should filter when texture coordinates are not pixel aligned.
Definition qsgtexture.h:34
AnisotropyLevel
Specifies the anisotropic filtering level to be used when the texture is not screen aligned.
Definition qsgtexture.h:40
\inmodule QtCore
Definition qsize.h:25
rect
[4]
Combined button and popup list for selecting options.
GLenum mode
GLenum GLuint GLint level
GLboolean r
[2]
GLenum GLuint texture
unsigned int uint
Definition qtypes.h:29