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
qsgsoftwarerenderablenode_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 QSGSOFTWARERENDERABLENODE_H
5
#define QSGSOFTWARERENDERABLENODE_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 <QtQuick/private/qtquickglobal_p.h>
19
20
#include <QtGui/QRegion>
21
#include <QtCore/QRect>
22
#include <QtGui/QTransform>
23
#include <QtQuick/qsgrectanglenode.h>
24
#include <QtQuick/qsgimagenode.h>
25
#include <QtQuick/qsgninepatchnode.h>
26
27
QT_BEGIN_NAMESPACE
28
29
class
QSGSimpleRectNode
;
30
class
QSGSimpleTextureNode
;
31
class
QSGSoftwareInternalImageNode
;
32
class
QSGSoftwarePainterNode
;
33
class
QSGSoftwareInternalRectangleNode
;
34
class
QSGSoftwareGlyphNode
;
35
class
QSGSoftwareNinePatchNode
;
36
class
QSGSoftwareSpriteNode
;
37
class
QSGRenderNode
;
38
39
class
Q_QUICK_EXPORT
QSGSoftwareRenderableNode
40
{
41
public
:
42
enum
NodeType
{
43
Invalid
= -1,
44
SimpleRect
,
45
SimpleTexture
,
46
Image
,
47
Painter
,
48
Rectangle
,
49
Glyph
,
50
NinePatch
,
51
SimpleRectangle
,
52
SimpleImage
,
53
#if QT_CONFIG(quick_sprite)
54
SpriteNode,
55
#endif
56
RenderNode
57
};
58
59
QSGSoftwareRenderableNode
(NodeType
type
,
QSGNode
*node);
60
~QSGSoftwareRenderableNode
();
61
62
void
update();
63
64
QRegion
renderNode(
QPainter
*
painter
,
bool
forceOpaquePainting =
false
);
65
QRect
boundingRectMin
()
const
{
return
m_boundingRectMin; }
66
QRect
boundingRectMax
()
const
{
return
m_boundingRectMax; }
67
NodeType
type
()
const
{
return
m_nodeType; }
68
bool
isOpaque
()
const
{
return
m_isOpaque; }
69
bool
isDirty
()
const
{
return
m_isDirty; }
70
bool
isDirtyRegionEmpty()
const
;
71
QSGNode
*
handle
()
const
{
return
m_handle.node; }
72
73
void
setTransform(
const
QTransform
&
transform
);
74
void
setClipRegion(
const
QRegion
&clipRegion,
bool
hasClipRegion =
true
);
75
void
setOpacity(
float
opacity);
76
QTransform
transform
()
const
{
return
m_transform; }
77
QRegion
clipRegion
()
const
{
return
m_clipRegion; }
78
float
opacity
()
const
{
return
m_opacity; }
79
80
void
markGeometryDirty();
81
void
markMaterialDirty();
82
83
void
addDirtyRegion(
const
QRegion
&dirtyRegion,
bool
forceDirty =
true
);
84
void
subtractDirtyRegion(
const
QRegion
&dirtyRegion);
85
86
QRegion
previousDirtyRegion(
bool
wasRemoved =
false
)
const
;
87
QRegion
dirtyRegion()
const
;
88
89
private
:
90
union
RenderableNodeHandle {
91
QSGNode
*node;
92
QSGSimpleRectNode
*simpleRectNode;
93
QSGSimpleTextureNode
*simpleTextureNode;
94
QSGSoftwareInternalImageNode
*imageNode;
95
QSGSoftwarePainterNode
*painterNode;
96
QSGSoftwareInternalRectangleNode
*rectangleNode;
97
QSGSoftwareGlyphNode
*glpyhNode;
98
QSGSoftwareNinePatchNode
*ninePatchNode;
99
QSGRectangleNode
*simpleRectangleNode;
100
QSGImageNode
*simpleImageNode;
101
QSGSoftwareSpriteNode
*spriteNode;
102
QSGRenderNode
*renderNode;
103
};
104
105
const
NodeType m_nodeType;
106
RenderableNodeHandle m_handle;
107
108
bool
m_isOpaque;
109
110
bool
m_isDirty;
111
QRegion
m_dirtyRegion;
112
QRegion
m_previousDirtyRegion;
113
114
QTransform
m_transform;
115
QRegion
m_clipRegion;
116
bool
m_hasClipRegion;
117
float
m_opacity;
118
119
QRect
m_boundingRectMin;
120
QRect
m_boundingRectMax;
121
};
122
123
QT_END_NAMESPACE
124
125
#endif
// QSGSOFTWARERENDERABLENODE_H
QPainter
The QPainter class performs low-level painting on widgets and other paint devices.
Definition
qpainter.h:46
QRect
\inmodule QtCore\reentrant
Definition
qrect.h:30
QRegion
The QRegion class specifies a clip region for a painter.
Definition
qregion.h:27
QSGImageNode
The QSGImageNode class is provided for convenience to easily draw textured content using the QML scen...
Definition
qsgimagenode.h:13
QSGNode
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition
qsgnode.h:37
QSGRectangleNode
The QSGRectangleNode class is a convenience class for drawing solid filled rectangles using scenegrap...
Definition
qsgrectanglenode.h:12
QSGRenderNode
The QSGRenderNode class represents a set of custom rendering commands targeting the graphics API that...
Definition
qsgrendernode.h:16
QSGSimpleRectNode
The QSGSimpleRectNode class is a convenience class for drawing solid filled rectangles using scenegra...
Definition
qsgsimplerectnode.h:13
QSGSimpleTextureNode
The QSGSimpleTextureNode class is provided for convenience to easily draw textured content using the ...
Definition
qsgsimpletexturenode.h:16
QSGSoftwareGlyphNode
Definition
qsgsoftwareglyphnode_p.h:23
QSGSoftwareInternalImageNode
Definition
qsgsoftwareinternalimagenode_p.h:71
QSGSoftwareInternalRectangleNode
Definition
qsgsoftwareinternalrectanglenode_p.h:27
QSGSoftwareNinePatchNode
Definition
qsgsoftwarepublicnodes_p.h:90
QSGSoftwarePainterNode
Definition
qsgsoftwarepainternode_p.h:26
QSGSoftwareRenderableNode
Definition
qsgsoftwarerenderablenode_p.h:40
QSGSoftwareRenderableNode::clipRegion
QRegion clipRegion() const
Definition
qsgsoftwarerenderablenode_p.h:77
QSGSoftwareRenderableNode::isDirty
bool isDirty() const
Definition
qsgsoftwarerenderablenode_p.h:69
QSGSoftwareRenderableNode::boundingRectMin
QRect boundingRectMin() const
Definition
qsgsoftwarerenderablenode_p.h:65
QSGSoftwareRenderableNode::isOpaque
bool isOpaque() const
Definition
qsgsoftwarerenderablenode_p.h:68
QSGSoftwareRenderableNode::NodeType
NodeType
Definition
qsgsoftwarerenderablenode_p.h:42
QSGSoftwareRenderableNode::SimpleTexture
@ SimpleTexture
Definition
qsgsoftwarerenderablenode_p.h:45
QSGSoftwareRenderableNode::SimpleImage
@ SimpleImage
Definition
qsgsoftwarerenderablenode_p.h:52
QSGSoftwareRenderableNode::Rectangle
@ Rectangle
Definition
qsgsoftwarerenderablenode_p.h:48
QSGSoftwareRenderableNode::NinePatch
@ NinePatch
Definition
qsgsoftwarerenderablenode_p.h:50
QSGSoftwareRenderableNode::SimpleRect
@ SimpleRect
Definition
qsgsoftwarerenderablenode_p.h:44
QSGSoftwareRenderableNode::Painter
@ Painter
Definition
qsgsoftwarerenderablenode_p.h:47
QSGSoftwareRenderableNode::Glyph
@ Glyph
Definition
qsgsoftwarerenderablenode_p.h:49
QSGSoftwareRenderableNode::SimpleRectangle
@ SimpleRectangle
Definition
qsgsoftwarerenderablenode_p.h:51
QSGSoftwareRenderableNode::Image
@ Image
Definition
qsgsoftwarerenderablenode_p.h:46
QSGSoftwareRenderableNode::type
NodeType type() const
Definition
qsgsoftwarerenderablenode_p.h:67
QSGSoftwareRenderableNode::transform
QTransform transform() const
Definition
qsgsoftwarerenderablenode_p.h:76
QSGSoftwareRenderableNode::boundingRectMax
QRect boundingRectMax() const
Definition
qsgsoftwarerenderablenode_p.h:66
QSGSoftwareRenderableNode::handle
QSGNode * handle() const
Definition
qsgsoftwarerenderablenode_p.h:71
QSGSoftwareRenderableNode::opacity
float opacity() const
Definition
qsgsoftwarerenderablenode_p.h:78
QSGSoftwareSpriteNode
Definition
qsgsoftwarespritenode_p.h:28
QTransform
The QTransform class specifies 2D transformations of a coordinate system.
Definition
qtransform.h:20
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
Invalid
@ Invalid
Definition
qmetaobject_p.h:35
type
GLenum type
Definition
qopengles2ext.h:150
transform
GLuint GLenum GLenum transform
Definition
qopenglext.h:11564
painter
QPainter painter(this)
[7]
qtdeclarative
src
quick
scenegraph
adaptations
software
qsgsoftwarerenderablenode_p.h
Generated by
1.10.0