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 QSGBASICGLYPHNODE_P_H
5#define QSGBASICGLYPHNODE_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
20QT_BEGIN_NAMESPACE
21
22class QSGMaterial;
23
24class Q_QUICK_PRIVATE_EXPORT QSGBasicGlyphNode: public QSGGlyphNode
25{
26public:
27 QSGBasicGlyphNode();
28 virtual ~QSGBasicGlyphNode();
29
30 QPointF baseLine() const override { return m_baseLine; }
31 void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override;
32 void setColor(const QColor &color) override;
33
34 void setPreferredAntialiasingMode(AntialiasingMode) override { }
35 void setStyle(QQuickText::TextStyle) override;
36 void setStyleColor(const QColor &) override;
37
38 virtual void setMaterialColor(const QColor &color) = 0;
39 void update() override = 0;
40
41protected:
42 QGlyphRun m_glyphs;
43 QPointF m_position;
44 QColor m_color;
45 QQuickText::TextStyle m_style;
46 QColor m_styleColor;
47
48 QPointF m_baseLine;
49 QSGMaterial *m_material;
50
51 QSGGeometry m_geometry;
52};
53
54QT_END_NAMESPACE
55
56#endif
57

source code of qtdeclarative/src/quick/scenegraph/qsgbasicglyphnode_p.h