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
qsgdefaultglyphnode_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 QSGDEFAULTGLYPHNODE_P_H
6#define QSGDEFAULTGLYPHNODE_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 <private/qsgadaptationlayer_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QSGDefaultGlyphNode : public QSGGlyphNode
24{
25public:
26 QSGDefaultGlyphNode(QSGRenderContext *context);
27 ~QSGDefaultGlyphNode() override;
28 void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override;
29 void setColor(const QColor &color) override;
30 void setStyle(QQuickText::TextStyle) override;
31 void setStyleColor(const QColor &) override;
32 QPointF baseLine() const override { return m_baseLine; }
33 void update() override;
34 void preprocess() override;
35 void setPreferredAntialiasingMode(AntialiasingMode) override;
36 void updateGeometry();
37
38 void recycle() override;
39
40private:
41 void cleanup();
42
43 enum DefaultGlyphNodeType {
44 RootGlyphNode,
45 SubGlyphNode
46 };
47
48 void setGlyphNodeType(DefaultGlyphNodeType type) { m_glyphNodeType = type; }
49
50 QSGRenderContext *m_context;
51 DefaultGlyphNodeType m_glyphNodeType;
52 QList<QSGNode *> m_nodesToDelete;
53
54 struct GlyphInfo {
55 QList<quint32> indexes;
56 QList<QPointF> positions;
57 };
58
59 uint m_dirtyGeometry: 1;
60 uint m_recycled : 1;
61
62 AntialiasingMode m_preferredAntialiasingMode;
63 QGlyphRun m_glyphs;
64 QPointF m_position;
65 QColor m_color;
66 QQuickText::TextStyle m_style;
67 QColor m_styleColor;
68 QPointF m_baseLine;
69 QSGGeometry m_geometry;
70};
71
72QT_END_NAMESPACE
73
74#endif
\inmodule QtCore
Definition qmargins.h:27
constexpr void setTop(int top) noexcept
Sets the Top margin to Top.
Definition qmargins.h:148
constexpr void setBottom(int bottom) noexcept
Sets the bottom margin to bottom.
Definition qmargins.h:154
constexpr QMargins(int left, int top, int right, int bottom) noexcept
Constructs margins with the given left, top, right, and bottom.
Definition qmargins.h:126
The QRawFont class provides access to a single physical instance of a font.
Definition qrawfont.h:24
\inmodule QtQuick
void setStyleColor(const QColor &c)
void setColor(const QColor &c)
Combined button and popup list for selecting options.