1// Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef QT3DEXTRAS_DISTANCEFIELDTEXTRENDERER_P_H
4#define QT3DEXTRAS_DISTANCEFIELDTEXTRENDERER_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists for the convenience
11// of other Qt classes. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <QtCore/QRectF>
18#include <Qt3DCore/qnode.h>
19#include <Qt3DCore/qentity.h>
20#include <Qt3DExtras/qt3dextras_global.h>
21#include <private/qglobal_p.h>
22
23QT_BEGIN_NAMESPACE
24
25namespace Qt3DRender {
26class QAbstractTexture;
27}
28
29namespace Qt3DExtras {
30
31class DistanceFieldTextRendererPrivate;
32
33class DistanceFieldTextRenderer : public Qt3DCore::QEntity
34{
35 Q_OBJECT
36
37public:
38 DistanceFieldTextRenderer(Qt3DCore::QNode *parent = nullptr);
39 ~DistanceFieldTextRenderer();
40
41 void setGlyphData(Qt3DRender::QAbstractTexture *glyphTexture,
42 const std::vector<float> &vertexData,
43 const std::vector<quint16> &indexData);
44
45 void setColor(const QColor &color);
46
47 Q_DECLARE_PRIVATE(DistanceFieldTextRenderer)
48};
49
50} // namespace Qt3DExtras
51
52QT_END_NAMESPACE
53
54#endif // QT3DEXTRAS_DISTANCEFIELDTEXTRENDERER_P_H
55

source code of qt3d/src/extras/text/distancefieldtextrenderer_p.h