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