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
qsgsoftwarepainternode_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 QSGSOFTWAREPAINTERNODE_H
6#define QSGSOFTWAREPAINTERNODE_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 <QtQuick/qquickpainteditem.h>
21
22#include <QtGui/QPixmap>
23
24QT_BEGIN_NAMESPACE
25
27{
28public:
29 QSGSoftwarePainterNode(QQuickPaintedItem *item);
31
32 void setPreferredRenderTarget(QQuickPaintedItem::RenderTarget target) override;
33
34 void setSize(const QSize &size) override;
35 QSize size() const { return m_size; }
36
37 void setDirty(const QRect &dirtyRect = QRect()) override;
38
39 void setOpaquePainting(bool opaque) override;
40 bool opaquePainting() const { return m_opaquePainting; }
41
42 void setLinearFiltering(bool linearFiltering) override;
43 bool linearFiltering() const { return m_linear_filtering; }
44
45 void setMipmapping(bool mipmapping) override;
46 bool mipmapping() const { return m_mipmapping; }
47
48 void setSmoothPainting(bool s) override;
49 bool smoothPainting() const { return m_smoothPainting; }
50
51 void setFillColor(const QColor &c) override;
52 QColor fillColor() const { return m_fillColor; }
53
54 void setContentsScale(qreal s) override;
55 qreal contentsScale() const { return m_contentsScale; }
56
57 void setFastFBOResizing(bool dynamic) override;
58 bool fastFBOResizing() const { return m_fastFBOResizing; }
59
60 QImage toImage() const override;
61 void update() override;
62 QSGTexture *texture() const override { return m_texture; }
63
64 void paint(QPainter *painter);
65
66 void paint();
67
68 void setTextureSize(const QSize &size) override;
69 QSize textureSize() const { return m_textureSize; }
70
71private:
72
73 QQuickPaintedItem::RenderTarget m_preferredRenderTarget;
74
75 QQuickPaintedItem *m_item;
76
77 QPixmap m_pixmap;
78 QSGTexture *m_texture;
79
80 QSize m_size;
81 bool m_dirtyContents;
82 QRect m_dirtyRect;
83 bool m_opaquePainting;
84 bool m_linear_filtering;
85 bool m_mipmapping;
86 bool m_smoothPainting;
87 bool m_fastFBOResizing;
88 QColor m_fillColor;
89 qreal m_contentsScale;
90 QSize m_textureSize;
91
92 bool m_dirtyGeometry;
93};
94
95QT_END_NAMESPACE
96
97#endif // QSGSOFTWAREPAINTERNODE_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
QSGTexture * texture() const override
void setDirty(const QRect &dirtyRect=QRect()) override
void setTextureSize(const QSize &size) override
void setPreferredRenderTarget(QQuickPaintedItem::RenderTarget target) override
void setOpaquePainting(bool opaque) override
void paint(QPainter *painter)
void setSmoothPainting(bool s) override
void setMipmapping(bool mipmapping) override
QImage toImage() const override
void setContentsScale(qreal s) override
void setFillColor(const QColor &c) override
void setLinearFiltering(bool linearFiltering) override
void setFastFBOResizing(bool dynamic) override
QSGSoftwarePainterNode(QQuickPaintedItem *item)
void setSize(const QSize &size) 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)