Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
24
26{
27public:
30
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
95
96#endif // QSGSOFTWAREPAINTERNODE_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtGui
Definition qimage.h:37
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
The QQuickPaintedItem class provides a way to use the QPainter API in the QML Scene Graph.
RenderTarget
This enum describes QQuickPaintedItem's render targets.
\inmodule QtCore\reentrant
Definition qrect.h:30
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 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
\inmodule QtQuick
Definition qsgtexture.h:20
\inmodule QtCore
Definition qsize.h:25
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum target
GLdouble s
[6]
Definition qopenglext.h:235
const GLubyte * c
double qreal
Definition qtypes.h:187
QGraphicsItem * item
QPainter painter(this)
[7]