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
qtextlayout.cpp File Reference

(d914c58c7ee07f0d7598cee3491b815bd8d8bc23)

#include "qtextlayout.h"
#include "qtextengine_p.h"
#include <qthread.h>
#include <qfont.h>
#include <qmath.h>
#include <qpainter.h>
#include <qvarlengtharray.h>
#include <qtextformat.h>
#include <qabstracttextdocumentlayout.h>
#include "qtextdocument_p.h"
#include "qtextformat_p.h"
#include "qpainterpath.h"
#include "qglyphrun.h"
#include "qglyphrun_p.h"
#include "qrawfont.h"
#include "qrawfont_p.h"
#include <limits.h>
#include <qdebug.h>
#include "qfontengine_p.h"
#include <private/qpainter_p.h>
+ Include dependency graph for qtextlayout.cpp:

Go to the source code of this file.

Macros

#define ObjectSelectionBrush   (QTextFormat::ForegroundBrush + 1)
 
#define SuppressText   0x5012
 
#define SuppressBackground   0x513
 
#define LB_DEBUG   if (0) qDebug
 

Functions

static void addSelectedRegionsToPath (QTextEngine *eng, int lineNumber, const QPointF &pos, QTextLayout::FormatRange *selection, QPainterPath *region, const QRectF &boundingRect)
 
static QRectF clipIfValid (const QRectF &rect, const QRectF &clip)
 
static void addNextCluster (int &pos, int end, QScriptLine &line, int &glyphCount, const QScriptItem &current, const unsigned short *logClusters, const QGlyphLayout &glyphs, QFixed *clusterWidth=nullptr)
 
static void drawBackground (QPainter *p, const QTextCharFormat &chf, const QRectF &r)
 
static void setPen (QPainter *p, const QPen &defaultPen, const QTextCharFormat &chf)
 
static QGlyphRun glyphRunWithInfo (QFontEngine *fontEngine, const QString &text, const QGlyphLayout &glyphLayout, const QPointF &pos, const QGlyphRun::GlyphRunFlags &flags, QTextLayout::GlyphRunRetrievalFlags retrievalFlags, QFixed selectionX, QFixed selectionWidth, int glyphsStart, int glyphsEnd, unsigned short *logClusters, int textPosition, int textLength)
 

Macro Definition Documentation

◆ LB_DEBUG

#define LB_DEBUG   if (0) qDebug

Definition at line 1664 of file qtextlayout.cpp.

◆ ObjectSelectionBrush

#define ObjectSelectionBrush   (QTextFormat::ForegroundBrush + 1)

Definition at line 30 of file qtextlayout.cpp.

Referenced by QTextLayout::draw().

◆ SuppressBackground

#define SuppressBackground   0x513

Definition at line 32 of file qtextlayout.cpp.

Referenced by QTextLayout::draw(), and drawBackground().

◆ SuppressText

#define SuppressText   0x5012

Definition at line 31 of file qtextlayout.cpp.

Referenced by QTextLayout::draw().

Function Documentation

◆ addNextCluster()

static void addNextCluster ( int & pos,
int end,
QScriptLine & line,
int & glyphCount,
const QScriptItem & current,
const unsigned short * logClusters,
const QGlyphLayout & glyphs,
QFixed * clusterWidth = nullptr )
inlinestatic

Definition at line 1796 of file qtextlayout.cpp.

References QGlyphLayout::advances, QGlyphLayout::attributes, QGlyphAttributes::clusterStart, QGlyphAttributes::dontPrint, QString::length(), line, QScriptItem::num_glyphs, pos, and Q_ASSERT.

+ Here is the call graph for this function:

◆ addSelectedRegionsToPath()

static void addSelectedRegionsToPath ( QTextEngine * eng,
int lineNumber,
const QPointF & pos,
QTextLayout::FormatRange * selection,
QPainterPath * region,
const QRectF & boundingRect )
static

Definition at line 942 of file qtextlayout.cpp.

References QPainterPath::addRect(), boundingRect(), line, QTextEngine::lines, pos, rect, and selection.

Referenced by QTextLayout::draw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipIfValid()

static QRectF clipIfValid ( const QRectF & rect,
const QRectF & clip )
inlinestatic

Definition at line 982 of file qtextlayout.cpp.

References QRectF::isValid(), and rect.

Referenced by QTextLayout::draw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawBackground()

static void drawBackground ( QPainter * p,
const QTextCharFormat & chf,
const QRectF & r )
static

Definition at line 2226 of file qtextlayout.cpp.

References Qt::NoBrush, QBrush::style(), and SuppressBackground.

+ Here is the call graph for this function:

◆ glyphRunWithInfo()

static QGlyphRun glyphRunWithInfo ( QFontEngine * fontEngine,
const QString & text,
const QGlyphLayout & glyphLayout,
const QPointF & pos,
const QGlyphRun::GlyphRunFlags & flags,
QTextLayout::GlyphRunRetrievalFlags retrievalFlags,
QFixed selectionX,
QFixed selectionWidth,
int glyphsStart,
int glyphsEnd,
unsigned short * logClusters,
int textPosition,
int textLength )
static

◆ setPen()

static void setPen ( QPainter * p,
const QPen & defaultPen,
const QTextCharFormat & chf )
static

Definition at line 2233 of file qtextlayout.cpp.

References Qt::NoBrush.