Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qglyphrun.h
Go to the documentation of this file.
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_H
5#define QGLYPHRUN_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qlist.h>
9#include <QtCore/qpoint.h>
10#include <QtGui/qrawfont.h>
11#include <QtCore/qshareddata.h>
12
13#if !defined(QT_NO_RAWFONT)
14
16
17
19class Q_GUI_EXPORT QGlyphRun
20{
21public:
23 Overline = 0x01,
24 Underline = 0x02,
25 StrikeOut = 0x04,
26 RightToLeft = 0x08,
27 SplitLigature = 0x10
28 };
29 Q_DECLARE_FLAGS(GlyphRunFlags, GlyphRunFlag)
30
31 QGlyphRun();
33 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QGlyphRun)
34 QGlyphRun &operator=(const QGlyphRun &other);
35 ~QGlyphRun();
36
37 void swap(QGlyphRun &other) noexcept { d.swap(other.d); }
38
39 QRawFont rawFont() const;
40 void setRawFont(const QRawFont &rawFont);
41
42 void setRawData(const quint32 *glyphIndexArray,
43 const QPointF *glyphPositionArray,
44 int size);
45
46 QList<quint32> glyphIndexes() const;
47 void setGlyphIndexes(const QList<quint32> &glyphIndexes);
48
49 QList<QPointF> positions() const;
50 void setPositions(const QList<QPointF> &positions);
51
52 void clear();
53
54 bool operator==(const QGlyphRun &other) const;
55 inline bool operator!=(const QGlyphRun &other) const
56 { return !operator==(other); }
57
58 void setOverline(bool overline);
59 bool overline() const;
60
61 void setUnderline(bool underline);
62 bool underline() const;
63
64 void setStrikeOut(bool strikeOut);
65 bool strikeOut() const;
66
67 void setRightToLeft(bool on);
68 bool isRightToLeft() const;
69
70 void setFlag(GlyphRunFlag flag, bool enabled = true);
71 void setFlags(GlyphRunFlags flags);
72 GlyphRunFlags flags() const;
73
74 void setBoundingRect(const QRectF &boundingRect);
75 QRectF boundingRect() const;
76
77 QList<qsizetype> stringIndexes() const;
78 void setStringIndexes(const QList<qsizetype> &stringIndexes);
79
80 void setSourceString(const QString &sourceString);
81 QString sourceString() const;
82
83 bool isEmpty() const;
84
85private:
86 friend class QGlyphRunPrivate;
87 friend class QTextLine;
88
89 QGlyphRun operator+(const QGlyphRun &other) const;
91
92 void detach();
93 QExplicitlySharedDataPointer<QGlyphRunPrivate> d;
94};
95
96Q_DECLARE_SHARED(QGlyphRun)
97
99
100#endif // QT_NO_RAWFONT
101
102#endif // QGLYPHRUN_H
The QGlyphRun class provides direct access to the internal glyphs in a font.
Definition qglyphrun.h:20
void swap(QGlyphRun &other) noexcept
Definition qglyphrun.h:37
bool operator!=(const QGlyphRun &other) const
Compares other to this QGlyphRun object.
Definition qglyphrun.h:55
\inmodule QtCore\reentrant
Definition qpoint.h:217
The QRawFont class provides access to a single physical instance of a font.
Definition qrawfont.h:24
\inmodule QtCore\reentrant
Definition qrect.h:484
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\reentrant
b clear()
Combined button and popup list for selecting options.
constexpr timespec operator+(const timespec &t1, const timespec &t2)
constexpr timespec & operator+=(timespec &t1, const timespec &t2)
static const QCssKnownValue positions[NumKnownPositionModes - 1]
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLbitfield flags
static const QRectF boundingRect(const QPointF *points, int pointCount)
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220
unsigned int quint32
Definition qtypes.h:50
QSharedPointer< T > other(t)
[5]