Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsgbasicinternalimagenode_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// Qt-Security score:significant reason:default
4
5#ifndef QSGBASICINTERNALIMAGENODE_P_H
6#define QSGBASICINTERNALIMAGENODE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qsgadaptationlayer_p.h>
20
22
23class Q_QUICK_EXPORT QSGBasicInternalImageNode : public QSGInternalImageNode
24{
25public:
26 QSGBasicInternalImageNode();
27
28 void setTargetRect(const QRectF &rect) override;
29 void setInnerTargetRect(const QRectF &rect) override;
30 void setInnerSourceRect(const QRectF &rect) override;
31 void setSubSourceRect(const QRectF &rect) override;
32 void setTexture(QSGTexture *texture) override;
33 void setAntialiasing(bool antialiasing) override;
34 void setMirror(bool mirrorHorizontally, bool mirrorVertically) override;
35 void update() override;
36 void preprocess() override;
37
38 static QSGGeometry *updateGeometry(const QRectF &targetRect,
39 const QRectF &innerTargetRect,
40 const QRectF &sourceRect,
41 const QRectF &innerSourceRect,
42 const QRectF &subSourceRect,
43 QSGGeometry *geometry,
44 bool mirrorHorizontally = false,
45 bool mirrorVertically = false,
46 bool antialiasing = false);
47
48protected:
49 virtual void updateMaterialAntialiasing() = 0;
50 virtual void setMaterialTexture(QSGTexture *texture) = 0;
51 virtual QSGTexture *materialTexture() const = 0;
52 virtual bool updateMaterialBlending() = 0;
53 virtual bool supportsWrap(const QSize &size) const = 0;
54
55 void updateGeometry();
56
57 QRectF m_targetRect;
58 QRectF m_innerTargetRect;
59 QRectF m_innerSourceRect;
60 QRectF m_subSourceRect;
61
62 uint m_antialiasing : 1;
63 uint m_mirrorHorizontally : 1;
64 uint m_mirrorVertically : 1;
65 uint m_dirtyGeometry : 1;
66
67 QSGGeometry m_geometry;
68
69 QSGDynamicTexture *m_dynamicTexture;
70 QSize m_dynamicTextureSize;
71 QRectF m_dynamicTextureSubRect;
72};
73
74QT_END_NAMESPACE
75
76#endif
Combined button and popup list for selecting options.
const QSGGeometry::AttributeSet & smoothImageAttributeSet()
static void appendQuad(int indexType, void **indexData, int topLeft, int topRight, int bottomLeft, int bottomRight)