| 1 | // Copyright (C) 2016 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 | |
| 4 | #ifndef QT3DEXTRAS_QTEXT2DENTITY_P_H |
| 5 | #define |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists for the convenience |
| 12 | // of other Qt classes. 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 <Qt3DCore/private/qentity_p.h> |
| 19 | #include <Qt3DExtras/private/distancefieldtextrenderer_p.h> |
| 20 | #include <Qt3DExtras/private/qdistancefieldglyphcache_p.h> |
| 21 | #include <QFont> |
| 22 | |
| 23 | QT_BEGIN_NAMESPACE |
| 24 | |
| 25 | namespace Qt3DCore { |
| 26 | class QScene; |
| 27 | } |
| 28 | |
| 29 | namespace Qt3DRender { |
| 30 | class QGeometryRenderer; |
| 31 | class QGeometry; |
| 32 | class QMaterial; |
| 33 | class QAttribute; |
| 34 | class QBuffer; |
| 35 | } |
| 36 | |
| 37 | namespace Qt3DExtras { |
| 38 | |
| 39 | class ; |
| 40 | class ; |
| 41 | |
| 42 | class : public Qt3DCore::QEntityPrivate |
| 43 | { |
| 44 | public: |
| 45 | (); |
| 46 | (); |
| 47 | |
| 48 | Q_DECLARE_PUBLIC(QText2DEntity) |
| 49 | |
| 50 | // keep track of the glyphs currently being displayed, |
| 51 | // to guarantee proper glyph ref-counting in the |
| 52 | // QDistanceFieldGlyphCache |
| 53 | QList<QGlyphRun> ; |
| 54 | QDistanceFieldGlyphCache *; |
| 55 | |
| 56 | void (Qt3DCore::QScene *scene) override; |
| 57 | |
| 58 | QFont ; |
| 59 | QFont ; // ignore point or pixel size, set to default value |
| 60 | |
| 61 | QColor ; |
| 62 | QString ; |
| 63 | float ; |
| 64 | float ; |
| 65 | Qt::Alignment ; |
| 66 | |
| 67 | QList<DistanceFieldTextRenderer*> ; |
| 68 | |
| 69 | qreal () const; |
| 70 | |
| 71 | void (const QList<QGlyphRun> &runs); |
| 72 | void (); |
| 73 | void (); |
| 74 | |
| 75 | struct |
| 76 | { |
| 77 | QDistanceFieldGlyphCache * = nullptr; |
| 78 | int = 0; |
| 79 | }; |
| 80 | |
| 81 | static QHash<Qt3DCore::QScene *, CacheEntry> ; |
| 82 | }; |
| 83 | |
| 84 | } // namespace Qt3DExtras |
| 85 | |
| 86 | QT_END_NAMESPACE |
| 87 | |
| 88 | #endif // QT3DEXTRAS_QTEXT2DENTITY_P_H |
| 89 | |