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>
13#if !defined(QT_NO_RAWFONT)
18class QGlyphRunPrivate;
29 Q_DECLARE_FLAGS(GlyphRunFlags, GlyphRunFlag)
32 QGlyphRun(
const QGlyphRun &other);
33 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QGlyphRun)
34 QGlyphRun &operator=(
const QGlyphRun &other);
37 void swap(QGlyphRun &other)
noexcept { d.swap(other.d); }
39 QRawFont rawFont()
const;
40 void setRawFont(
const QRawFont &rawFont);
42 void setRawData(
const quint32 *glyphIndexArray,
43 const QPointF *glyphPositionArray,
46 QList<quint32> glyphIndexes()
const;
47 void setGlyphIndexes(
const QList<quint32> &glyphIndexes);
49 QList<QPointF> positions()
const;
50 void setPositions(
const QList<QPointF> &positions);
54 bool operator==(
const QGlyphRun &other)
const;
55 inline bool operator!=(
const QGlyphRun &other)
const
56 {
return !operator==(other); }
58 void setOverline(
bool overline);
59 bool overline()
const;
61 void setUnderline(
bool underline);
62 bool underline()
const;
64 void setStrikeOut(
bool strikeOut);
65 bool strikeOut()
const;
67 void setRightToLeft(
bool on);
68 bool isRightToLeft()
const;
70 void setFlag(GlyphRunFlag flag,
bool enabled =
true);
71 void setFlags(GlyphRunFlags flags);
72 GlyphRunFlags flags()
const;
74 void setBoundingRect(
const QRectF &boundingRect);
75 QRectF boundingRect()
const;
77 QList<qsizetype> stringIndexes()
const;
78 void setStringIndexes(
const QList<qsizetype> &stringIndexes);
80 void setSourceString(
const QString &sourceString);
81 QString sourceString()
const;
86 friend class QGlyphRunPrivate;
87 friend class QTextLine;
89 QGlyphRun operator+(
const QGlyphRun &other)
const;
90 QGlyphRun &operator+=(
const QGlyphRun &other);
93 QExplicitlySharedDataPointer<QGlyphRunPrivate> d;
The QGlyphRun class provides direct access to the internal glyphs in a font.
QPainterPathStroker(const QPen &pen)
Creates a new stroker based on pen.
void drawOpaqueBackground(const QPainterPath &path, DrawOperation operation)
QPaintEngineEx * extended
QPaintDevice * helper_device
void initFrom(const QPaintDevice *device)
void draw_helper(const QPainterPath &path, DrawOperation operation=StrokeAndFillDraw)
void drawStretchedGradient(const QPainterPath &path, DrawOperation operation)
QTransform hidpiScaleTransform() const
QTransform viewTransform() const
qreal effectiveDevicePixelRatio() const
void drawGlyphs(const QPointF &decorationPosition, const quint32 *glyphArray, QFixedPoint *positionArray, int glyphCount, QFontEngine *fontEngine, bool overline=false, bool underline=false, bool strikeOut=false)
\inmodule QtCore\reentrant
The QStaticText class enables optimized drawing of text when the text and its layout is updated rarel...
Q_GUI_EXPORT bool qt_isExtendedRadialGradient(const QBrush &brush)
#define QPaintEngine_OpaqueBackground
void qt_format_text(const QFont &fnt, const QRectF &_r, int tf, const QString &str, QRectF *brect, int tabstops, int *ta, int tabarraylen, QPainter *painter)
static void qt_draw_decoration_for_glyphs(QPainter *painter, const QPointF &decorationPosition, const glyph_t *glyphArray, const QFixedPoint *positions, int glyphCount, QFontEngine *fontEngine, bool underline, bool overline, bool strikeOut)
static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const QFontEngine *fe, QTextEngine *textEngine, QTextCharFormat::UnderlineStyle underlineStyle, QTextItem::RenderFlags flags, qreal width, const QTextCharFormat &charFormat)
static bool needsEmulation(const QBrush &brush)
static bool needsResolving(const QBrush &brush)
void qt_format_text(const QFont &font, const QRectF &_r, int tf, const QTextOption *option, const QString &str, QRectF *brect, int tabstops, int *tabarray, int tabarraylen, QPainter *painter)
static QPointF roundInDeviceCoordinates(const QPointF &p, const QTransform &m)
QPixmap qt_pixmapForBrush(int style, bool invert)
static bool is_brush_transparent(const QBrush &brush)
void qt_format_text(const QFont &fnt, const QRectF &_r, int tf, int alignment, const QTextOption *option, const QString &str, QRectF *brect, int tabstops, int *ta, int tabarraylen, QPainter *painter)
static QBrush stretchGradientToUserSpace(const QBrush &brush, const QRectF &boundingRect)
static bool qt_painter_thread_test(int devType, int engineType, const char *what)
static void qt_cleanup_painter_state(QPainterPrivate *d)
static QGradient::CoordinateMode coordinateMode(const QBrush &brush)
static uint line_emulation(uint emulation)
static QPixmap generateWavyPixmap(qreal maxRadius, const QPen &pen)
#define QGradient_StretchToDevice
static bool is_pen_transparent(const QPen &pen)
bool qHasPixmapTexture(const QBrush &)
Q_GUI_EXPORT void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivate::DrawOperation operation)