| 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 QGLYPHRUN_P_H |
| 5 | #define QGLYPHRUN_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 for the convenience |
| 12 | // of internal files. This header file may change from version to version |
| 13 | // without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtCore/qshareddata.h> |
| 19 | #include <QtGui/private/qtguiglobal_p.h> |
| 20 | #include "qglyphrun.h" |
| 21 | #include "qrawfont.h" |
| 22 | |
| 23 | #include <qfont.h> |
| 24 | |
| 25 | #if !defined(QT_NO_RAWFONT) |
| 26 | |
| 27 | QT_BEGIN_NAMESPACE |
| 28 | |
| 29 | class QGlyphRunPrivate: public QSharedData |
| 30 | { |
| 31 | public: |
| 32 | QGlyphRunPrivate() |
| 33 | : glyphIndexData(glyphIndexes.constData()) |
| 34 | , glyphIndexDataSize(0) |
| 35 | , glyphPositionData(glyphPositions.constData()) |
| 36 | , glyphPositionDataSize(0) |
| 37 | , textRangeStart(-1) |
| 38 | , textRangeEnd(-1) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | QGlyphRunPrivate(const QGlyphRunPrivate &other) |
| 43 | : QSharedData(other) |
| 44 | , glyphIndexes(other.glyphIndexes) |
| 45 | , glyphPositions(other.glyphPositions) |
| 46 | , stringIndexes(other.stringIndexes) |
| 47 | , rawFont(other.rawFont) |
| 48 | , boundingRect(other.boundingRect) |
| 49 | , sourceString(other.sourceString) |
| 50 | , flags(other.flags) |
| 51 | , glyphIndexData(other.glyphIndexData) |
| 52 | , glyphIndexDataSize(other.glyphIndexDataSize) |
| 53 | , glyphPositionData(other.glyphPositionData) |
| 54 | , glyphPositionDataSize(other.glyphPositionDataSize) |
| 55 | , textRangeStart(other.textRangeStart) |
| 56 | , textRangeEnd(other.textRangeEnd) |
| 57 | { |
| 58 | } |
| 59 | |
| 60 | QList<quint32> glyphIndexes; |
| 61 | QList<QPointF> glyphPositions; |
| 62 | QList<qsizetype> stringIndexes; |
| 63 | QRawFont rawFont; |
| 64 | QRectF boundingRect; |
| 65 | QString sourceString; |
| 66 | |
| 67 | QGlyphRun::GlyphRunFlags flags; |
| 68 | |
| 69 | const quint32 *glyphIndexData; |
| 70 | int glyphIndexDataSize; |
| 71 | |
| 72 | const QPointF *glyphPositionData; |
| 73 | int glyphPositionDataSize; |
| 74 | |
| 75 | int ; |
| 76 | int ; |
| 77 | |
| 78 | static QGlyphRunPrivate *get(const QGlyphRun &glyphRun) |
| 79 | { |
| 80 | return glyphRun.d.data(); |
| 81 | } |
| 82 | }; |
| 83 | |
| 84 | QT_END_NAMESPACE |
| 85 | |
| 86 | #endif // QT_NO_RAWFONT |
| 87 | |
| 88 | #endif // QGLYPHRUN_P_H |
| 89 | |