Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qsgdistancefieldglyphnode_p_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
QSGDISTANCEFIELDGLYPHNODE_P_P_H
6
#
define
QSGDISTANCEFIELDGLYPHNODE_P_P_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
<
QtQuick
/
qsgmaterial
.
h
>
20
#
include
<
QtQuick
/
private
/
qsgplaintexture_p
.
h
>
21
#
include
"qsgdistancefieldglyphnode_p.h"
22
#
include
"qsgadaptationlayer_p.h"
23
24
QT_BEGIN_NAMESPACE
25
26
class
QSGPlainTexture;
27
28
class
Q_QUICK_EXPORT
QSGDistanceFieldTextMaterial
:
public
QSGMaterial
29
{
30
public
:
31
QSGDistanceFieldTextMaterial();
32
~QSGDistanceFieldTextMaterial();
33
34
QSGMaterialType *type()
const
override;
35
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const
override;
36
int
compare(
const
QSGMaterial *other)
const
override;
37
38
virtual
void
setColor(
const
QColor &color);
39
const
QVector4D &color()
const
{
return
m_color; }
40
41
void
setGlyphCache(QSGDistanceFieldGlyphCache *a) { m_glyph_cache = a; }
42
QSGDistanceFieldGlyphCache *glyphCache()
const
{
return
m_glyph_cache; }
43
44
void
setTexture(
const
QSGDistanceFieldGlyphCache::Texture * tex) { m_texture = tex; }
45
const
QSGDistanceFieldGlyphCache::Texture * texture()
const
{
return
m_texture; }
46
47
void
setFontScale(qreal fontScale) { m_fontScale = fontScale; }
48
qreal fontScale()
const
{
return
m_fontScale; }
49
50
QSize textureSize()
const
{
return
m_size; }
51
52
bool
updateTextureSize();
53
bool
updateTextureSizeAndWrapper();
54
QSGTexture *wrapperTexture()
const
{
return
m_sgTexture; }
55
56
protected
:
57
QSize m_size;
58
QVector4D m_color;
59
QSGDistanceFieldGlyphCache *m_glyph_cache;
60
const
QSGDistanceFieldGlyphCache::Texture *m_texture;
61
qreal m_fontScale;
62
QSGPlainTexture *m_sgTexture;
63
};
64
65
class
Q_QUICK_EXPORT
QSGDistanceFieldStyledTextMaterial
:
public
QSGDistanceFieldTextMaterial
66
{
67
public
:
68
QSGDistanceFieldStyledTextMaterial();
69
~QSGDistanceFieldStyledTextMaterial();
70
71
QSGMaterialType *type()
const
override = 0;
72
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const
override = 0;
73
int
compare(
const
QSGMaterial *other)
const
override;
74
75
void
setStyleColor(
const
QColor &color);
76
const
QVector4D &styleColor()
const
{
return
m_styleColor; }
77
78
protected
:
79
QVector4D m_styleColor;
80
};
81
82
class
Q_QUICK_EXPORT
QSGDistanceFieldOutlineTextMaterial
:
public
QSGDistanceFieldStyledTextMaterial
83
{
84
public
:
85
QSGDistanceFieldOutlineTextMaterial();
86
~QSGDistanceFieldOutlineTextMaterial();
87
88
QSGMaterialType *type()
const
override;
89
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const
override;
90
};
91
92
class
Q_QUICK_EXPORT
QSGDistanceFieldShiftedStyleTextMaterial
:
public
QSGDistanceFieldStyledTextMaterial
93
{
94
public
:
95
QSGDistanceFieldShiftedStyleTextMaterial();
96
~QSGDistanceFieldShiftedStyleTextMaterial();
97
98
QSGMaterialType *type()
const
override;
99
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const
override;
100
int
compare(
const
QSGMaterial *other)
const
override;
101
102
void
setShift(
const
QPointF &shift) { m_shift = shift; }
103
const
QPointF &shift()
const
{
return
m_shift; }
104
105
protected
:
106
QPointF m_shift;
107
};
108
109
class
Q_QUICK_EXPORT
QSGHiQSubPixelDistanceFieldTextMaterial
:
public
QSGDistanceFieldTextMaterial
110
{
111
public
:
112
QSGMaterialType *type()
const
override;
113
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const
override;
114
void
setColor(
const
QColor &color) override {
115
const
auto
rgbColor = color.toRgb();
116
m_color = QVector4D(rgbColor.redF(), rgbColor.greenF(), rgbColor.blueF(), rgbColor.alphaF());
117
}
118
};
119
120
class
Q_QUICK_EXPORT
QSGLoQSubPixelDistanceFieldTextMaterial
:
public
QSGDistanceFieldTextMaterial
121
{
122
public
:
123
QSGMaterialType *type()
const
override;
124
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const
override;
125
void
setColor(
const
QColor &color) override {
126
const
auto
rgbColor = color.toRgb();
127
m_color = QVector4D(rgbColor.redF(), rgbColor.greenF(), rgbColor.blueF(), rgbColor.alphaF());
128
}
129
};
130
131
QT_END_NAMESPACE
132
133
#
endif
QSGDistanceFieldGlyphNode
Definition
qsgdistancefieldglyphnode_p.h:32
QSGDistanceFieldGlyphNode::invalidateGlyphs
void invalidateGlyphs(const QList< quint32 > &glyphs) override
Definition
qsgdistancefieldglyphnode.cpp:173
QSGDistanceFieldGlyphNode::baseLine
QPointF baseLine() const override
Definition
qsgdistancefieldglyphnode_p.h:37
QSGDistanceFieldGlyphNode::QSGDistanceFieldGlyphNode
QSGDistanceFieldGlyphNode(QSGRenderContext *context)
Definition
qsgdistancefieldglyphnode.cpp:16
QSGDistanceFieldGlyphNode::setStyleColor
void setStyleColor(const QColor &color) override
Definition
qsgdistancefieldglyphnode.cpp:151
QSGDistanceFieldGlyphNode::updateGeometry
void updateGeometry()
Definition
qsgdistancefieldglyphnode.cpp:187
QSGDistanceFieldGlyphNode::setStyle
void setStyle(QQuickText::TextStyle style) override
Definition
qsgdistancefieldglyphnode.cpp:143
QSGDistanceFieldGlyphNode::recycle
void recycle() override
Definition
qsgdistancefieldglyphnode.cpp:58
QSGDistanceFieldGlyphNode::update
void update() override
Definition
qsgdistancefieldglyphnode.cpp:159
QSGDistanceFieldGlyphNode::setRenderTypeQuality
void setRenderTypeQuality(int renderTypeQuality) override
Definition
qsgdistancefieldglyphnode.cpp:88
QSGDistanceFieldGlyphNode::setColor
void setColor(const QColor &color) override
Definition
qsgdistancefieldglyphnode.cpp:77
QSGDistanceFieldGlyphNode::setPreferredAntialiasingMode
void setPreferredAntialiasingMode(AntialiasingMode mode) override
Definition
qsgdistancefieldglyphnode.cpp:96
QSGDistanceFieldGlyphNode::~QSGDistanceFieldGlyphNode
~QSGDistanceFieldGlyphNode()
Definition
qsgdistancefieldglyphnode.cpp:37
QSGDistanceFieldGlyphNode::preprocess
void preprocess() override
Override this function to do processing on the node before it is rendered.
Definition
qsgdistancefieldglyphnode.cpp:165
QSGDistanceFieldGlyphNode::setGlyphs
void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override
Definition
qsgdistancefieldglyphnode.cpp:104
QSGDistanceFieldOutlineTextMaterial
Definition
qsgdistancefieldglyphnode_p_p.h:83
QSGDistanceFieldShiftedStyleTextMaterial
Definition
qsgdistancefieldglyphnode_p_p.h:93
QSGDistanceFieldStyledTextMaterial
Definition
qsgdistancefieldglyphnode_p_p.h:66
QSGDistanceFieldTextMaterial
Definition
qsgdistancefieldglyphnode_p_p.h:29
QSGHiQSubPixelDistanceFieldTextMaterial
Definition
qsgdistancefieldglyphnode_p_p.h:110
QSGLoQSubPixelDistanceFieldTextMaterial
Definition
qsgdistancefieldglyphnode_p_p.h:121
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
Q_DECLARE_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcQIORing)
qtdeclarative
src
quick
scenegraph
qsgdistancefieldglyphnode_p_p.h
Generated on
for Qt by
1.18.0