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
qsgdefaultpainternode_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 QSGDEFAULTPAINTERNODE_P_H
5
#define QSGDEFAULTPAINTERNODE_P_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 "
qsgtexturematerial.h
"
20
#include "
qsgplaintexture_p.h
"
21
22
#include <QtQuick/qquickpainteditem.h>
23
24
#include <QtGui/qcolor.h>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QSGDefaultRenderContext
;
29
30
class
Q_QUICK_EXPORT
QSGPainterTexture
:
public
QSGPlainTexture
31
{
32
public
:
33
QSGPainterTexture
();
34
35
void
setDirtyRect
(
const
QRect
&
rect
) { m_dirty_rect =
rect
; }
36
37
void
commitTextureOperations(
QRhi
*rhi,
QRhiResourceUpdateBatch
*resourceUpdates)
override
;
38
39
private
:
40
QRect
m_dirty_rect;
41
};
42
43
class
Q_QUICK_EXPORT
QSGDefaultPainterNode
:
public
QSGPainterNode
44
{
45
public
:
46
QSGDefaultPainterNode
(
QQuickPaintedItem
*
item
);
47
virtual
~QSGDefaultPainterNode
();
48
49
void
setPreferredRenderTarget(
QQuickPaintedItem::RenderTarget
target
)
override
;
50
51
void
setSize(
const
QSize
&
size
)
override
;
52
QSize
size
()
const
{
return
m_size; }
53
54
void
setDirty(
const
QRect
&dirtyRect =
QRect
())
override
;
55
56
void
setOpaquePainting(
bool
opaque)
override
;
57
bool
opaquePainting
()
const
{
return
m_opaquePainting; }
58
59
void
setLinearFiltering(
bool
linearFiltering)
override
;
60
bool
linearFiltering
()
const
{
return
m_linear_filtering; }
61
62
void
setMipmapping(
bool
mipmapping)
override
;
63
bool
mipmapping
()
const
{
return
m_mipmapping; }
64
65
void
setSmoothPainting(
bool
s
)
override
;
66
bool
smoothPainting
()
const
{
return
m_smoothPainting; }
67
68
void
setFillColor(
const
QColor
&
c
)
override
;
69
QColor
fillColor
()
const
{
return
m_fillColor; }
70
71
void
setContentsScale(
qreal
s
)
override
;
72
qreal
contentsScale
()
const
{
return
m_contentsScale; }
73
74
void
setFastFBOResizing(
bool
fastResizing)
override
;
75
bool
fastFBOResizing
()
const
{
return
m_fastFBOResizing; }
76
77
void
setTextureSize(
const
QSize
&textureSize)
override
;
78
QSize
textureSize
()
const
{
return
m_textureSize; }
79
80
QImage
toImage()
const override
;
81
void
update()
override
;
82
83
void
paint
();
84
85
QSGTexture
*
texture
()
const override
{
return
m_texture; }
86
87
private
:
88
void
updateTexture();
89
void
updateGeometry();
90
void
updateRenderTarget();
91
92
QSGDefaultRenderContext
*m_context;
93
94
QQuickPaintedItem::RenderTarget
m_preferredRenderTarget;
95
QQuickPaintedItem::RenderTarget
m_actualRenderTarget;
96
97
QQuickPaintedItem
*m_item;
98
99
QImage
m_image;
100
101
QSGOpaqueTextureMaterial
m_material;
102
QSGTextureMaterial
m_materialO;
103
QSGGeometry
m_geometry;
104
QSGPainterTexture
*m_texture;
105
106
QSize
m_size;
107
QSize
m_textureSize;
108
QRect
m_dirtyRect;
109
QColor
m_fillColor;
110
qreal
m_contentsScale;
111
112
bool
m_dirtyContents : 1;
113
bool
m_opaquePainting : 1;
114
bool
m_linear_filtering : 1;
115
bool
m_mipmapping : 1;
116
bool
m_smoothPainting : 1;
117
bool
m_multisamplingSupported : 1;
118
bool
m_fastFBOResizing : 1;
119
bool
m_dirtyGeometry : 1;
120
bool
m_dirtyRenderTarget : 1;
121
bool
m_dirtyTexture : 1;
122
};
123
124
QT_END_NAMESPACE
125
126
#endif
// QSGDEFAULTPAINTERNODE_P_H
QColor
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition
qcolor.h:31
QImage
\inmodule QtGui
Definition
qimage.h:37
QQuickPaintedItem
The QQuickPaintedItem class provides a way to use the QPainter API in the QML Scene Graph.
Definition
qquickpainteditem.h:14
QQuickPaintedItem::RenderTarget
RenderTarget
This enum describes QQuickPaintedItem's render targets.
Definition
qquickpainteditem.h:31
QRect
\inmodule QtCore\reentrant
Definition
qrect.h:30
QRhiResourceUpdateBatch
\inmodule QtGui
Definition
qrhi.h:1731
QRhi
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition
qrhi.h:1804
QSGDefaultPainterNode
Definition
qsgdefaultpainternode_p.h:44
QSGDefaultPainterNode::smoothPainting
bool smoothPainting() const
Definition
qsgdefaultpainternode_p.h:66
QSGDefaultPainterNode::linearFiltering
bool linearFiltering() const
Definition
qsgdefaultpainternode_p.h:60
QSGDefaultPainterNode::contentsScale
qreal contentsScale() const
Definition
qsgdefaultpainternode_p.h:72
QSGDefaultPainterNode::mipmapping
bool mipmapping() const
Definition
qsgdefaultpainternode_p.h:63
QSGDefaultPainterNode::textureSize
QSize textureSize() const
Definition
qsgdefaultpainternode_p.h:78
QSGDefaultPainterNode::fillColor
QColor fillColor() const
Definition
qsgdefaultpainternode_p.h:69
QSGDefaultPainterNode::opaquePainting
bool opaquePainting() const
Definition
qsgdefaultpainternode_p.h:57
QSGDefaultPainterNode::texture
QSGTexture * texture() const override
Definition
qsgdefaultpainternode_p.h:85
QSGDefaultPainterNode::size
QSize size() const
Definition
qsgdefaultpainternode_p.h:52
QSGDefaultPainterNode::fastFBOResizing
bool fastFBOResizing() const
Definition
qsgdefaultpainternode_p.h:75
QSGDefaultRenderContext
Definition
qsgdefaultrendercontext_p.h:36
QSGGeometry
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
Definition
qsggeometry.h:15
QSGOpaqueTextureMaterial
The QSGOpaqueTextureMaterial class provides a convenient way of rendering textured geometry in the sc...
Definition
qsgtexturematerial.h:13
QSGPainterNode
Definition
qsgadaptationlayer_p.h:152
QSGPainterTexture
Definition
qsgdefaultpainternode_p.h:31
QSGPainterTexture::setDirtyRect
void setDirtyRect(const QRect &rect)
Definition
qsgdefaultpainternode_p.h:35
QSGPlainTexture
Definition
qsgplaintexture_p.h:27
QSGTextureMaterial
The QSGTextureMaterial class provides a convenient way of rendering textured geometry in the scene gr...
Definition
qsgtexturematerial.h:52
QSGTexture
\inmodule QtQuick
Definition
qsgtexture.h:20
QSize
\inmodule QtCore
Definition
qsize.h:25
paint
QPainter paint
Definition
doc_src_groups.cpp:25
rect
rect
[4]
Definition
doc_src_styles.cpp:43
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
size
GLenum GLuint GLintptr GLsizeiptr size
[1]
Definition
qopengles2ext.h:660
target
GLenum target
Definition
qopengles2ext.h:751
s
GLdouble s
[6]
Definition
qopenglext.h:235
c
const GLubyte * c
Definition
qopenglext.h:12701
qsgplaintexture_p.h
qsgtexturematerial.h
qreal
double qreal
Definition
qtypes.h:187
item
QGraphicsItem * item
Definition
src_gui_graphicsview_qgraphicsitem.cpp:107
qtdeclarative
src
quick
scenegraph
util
qsgdefaultpainternode_p.h
Generated by
1.10.0