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
4#ifndef QSGSOFTWAREINTERNALIMAGENODE_H
5#define QSGSOFTWAREINTERNALIMAGENODE_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 <private/qsgadaptationlayer_p.h>
19#include <private/qsgtexturematerial_p.h>
20
21#include <QtCore/QPointer>
22
24
25namespace QSGSoftwareHelpers {
26
28
30{
31 inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule)
33 inline QTileRules(Qt::TileRule rule = Qt::StretchTile)
37};
38
39#ifndef Q_QDOC
40// For internal use only.
62#endif
63
67
68} // QSGSoftwareHelpers namespace
69
71{
72public:
74
75 void setTargetRect(const QRectF &rect) override;
76 void setInnerTargetRect(const QRectF &rect) override;
77 void setInnerSourceRect(const QRectF &rect) override;
78 void setSubSourceRect(const QRectF &rect) override;
79 void setTexture(QSGTexture *texture) override;
80 void setMirror(bool mirrorHorizontally, bool mirrorVertically) override;
81 void setMipmapFiltering(QSGTexture::Filtering filtering) override;
82 void setFiltering(QSGTexture::Filtering filtering) override;
83 void setHorizontalWrapMode(QSGTexture::WrapMode wrapMode) override;
84 void setVerticalWrapMode(QSGTexture::WrapMode wrapMode) override;
85 void update() override;
86
87 void preprocess() override;
88
89 void paint(QPainter *painter);
90
91 QRectF rect() const;
92
93 const QPixmap &pixmap() const;
94private:
95 void updateCachedMirroredPixmap();
96 QRectF m_targetRect;
97 QRectF m_innerTargetRect;
98 QRectF m_innerSourceRect;
99 QRectF m_subSourceRect;
100
101 QPointer<QSGTexture> m_texture;
102 QPixmap m_cachedMirroredPixmap;
103
104 bool m_mirrorHorizontally;
105 bool m_mirrorVertically;
106 bool m_textureIsLayer;
107 bool m_smooth;
108 bool m_tileHorizontal;
109 bool m_tileVertical;
110 bool m_cachedMirroredPixmapIsDirty;
111};
112
113QT_END_NAMESPACE
114
115#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
QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule)
QTileRules(Qt::TileRule rule=Qt::StretchTile)