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
qsgsoftwareinternalimagenode_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 QSGSOFTWAREINTERNALIMAGENODE_H
6#define QSGSOFTWAREINTERNALIMAGENODE_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#include <private/qsgtexturematerial_p.h>
21
22#include <QtCore/QPointer>
23
25
26namespace QSGSoftwareHelpers {
27
29
31{
32 inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule)
34 inline QTileRules(Qt::TileRule rule = Qt::StretchTile)
38};
39
40#ifndef Q_QDOC
41// For internal use only.
63#endif
64
68
69} // QSGSoftwareHelpers namespace
70
72{
73public:
75
76 void setTargetRect(const QRectF &rect) override;
77 void setInnerTargetRect(const QRectF &rect) override;
78 void setInnerSourceRect(const QRectF &rect) override;
79 void setSubSourceRect(const QRectF &rect) override;
80 void setTexture(QSGTexture *texture) override;
81 void setMirror(bool mirrorHorizontally, bool mirrorVertically) override;
82 void setMipmapFiltering(QSGTexture::Filtering filtering) override;
83 void setFiltering(QSGTexture::Filtering filtering) override;
84 void setHorizontalWrapMode(QSGTexture::WrapMode wrapMode) override;
85 void setVerticalWrapMode(QSGTexture::WrapMode wrapMode) override;
86 void update() override;
87
88 void preprocess() override;
89
90 void paint(QPainter *painter);
91
92 QRectF rect() const;
93
94 const QPixmap &pixmap() const;
95private:
96 void updateCachedMirroredPixmap();
97 QRectF m_targetRect;
98 QRectF m_innerTargetRect;
99 QRectF m_innerSourceRect;
100 QRectF m_subSourceRect;
101
102 QPointer<QSGTexture> m_texture;
103 QPixmap m_cachedMirroredPixmap;
104
105 bool m_mirrorHorizontally;
106 bool m_mirrorVertically;
107 bool m_textureIsLayer;
108 bool m_smooth;
109 bool m_tileHorizontal;
110 bool m_tileVertical;
111 bool m_cachedMirroredPixmapIsDirty;
112};
113
114QT_END_NAMESPACE
115
116#endif // QSGSOFTWAREINTERNALIMAGENODE_H
void setInnerSourceRect(const QRectF &rect) override
void setTexture(QSGTexture *texture) override
void setSubSourceRect(const QRectF &rect) override
void preprocess() override
Override this function to do processing on the node before it is rendered.
void setTargetRect(const QRectF &rect) override
void setVerticalWrapMode(QSGTexture::WrapMode wrapMode) override
void setInnerTargetRect(const QRectF &rect) override
void setMirror(bool mirrorHorizontally, bool mirrorVertically) override
void setMipmapFiltering(QSGTexture::Filtering filtering) override
void setHorizontalWrapMode(QSGTexture::WrapMode wrapMode) override
void setFiltering(QSGTexture::Filtering filtering) override
void setAntialiasing(bool antialiasing) override
void setColor(const QColor &color) override
void setGradientStops(const QGradientStops &stops) override
void setPenColor(const QColor &color) override
QVarLengthArray< QPainter::PixmapFragment, 16 > QPixmapFragmentsArray
Combined button and popup list for selecting options.
QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule)
QTileRules(Qt::TileRule rule=Qt::StretchTile)