/src/qtbase/src/gui/text/qglyphrun_p.h
Line | Count | Source |
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 | 0 | : glyphIndexData(glyphIndexes.constData()) |
34 | 0 | , glyphIndexDataSize(0) |
35 | 0 | , glyphPositionData(glyphPositions.constData()) |
36 | 0 | , glyphPositionDataSize(0) |
37 | 0 | , textRangeStart(-1) |
38 | 0 | , textRangeEnd(-1) |
39 | 0 | { |
40 | 0 | } |
41 | | |
42 | | QGlyphRunPrivate(const QGlyphRunPrivate &other) |
43 | 0 | : QSharedData(other) |
44 | 0 | , glyphIndexes(other.glyphIndexes) |
45 | 0 | , glyphPositions(other.glyphPositions) |
46 | 0 | , stringIndexes(other.stringIndexes) |
47 | 0 | , rawFont(other.rawFont) |
48 | 0 | , boundingRect(other.boundingRect) |
49 | 0 | , sourceString(other.sourceString) |
50 | 0 | , flags(other.flags) |
51 | 0 | , glyphIndexData(other.glyphIndexData) |
52 | 0 | , glyphIndexDataSize(other.glyphIndexDataSize) |
53 | 0 | , glyphPositionData(other.glyphPositionData) |
54 | 0 | , glyphPositionDataSize(other.glyphPositionDataSize) |
55 | 0 | , textRangeStart(other.textRangeStart) |
56 | 0 | , textRangeEnd(other.textRangeEnd) |
57 | 0 | { |
58 | 0 | } |
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 textRangeStart; |
76 | | int textRangeEnd; |
77 | | |
78 | | static QGlyphRunPrivate *get(const QGlyphRun &glyphRun) |
79 | 0 | { |
80 | 0 | return glyphRun.d.data(); |
81 | 0 | } |
82 | | }; |
83 | | |
84 | | QT_END_NAMESPACE |
85 | | |
86 | | #endif // QT_NO_RAWFONT |
87 | | |
88 | | #endif // QGLYPHRUN_P_H |