Renders formatted text into painter paths.
More...
#include <RTextRenderer.h>
List of all members.
Private Member Functions |
| QRectF | getCharacterRect (const QString &fontName, const QChar &ch) const |
| QRectF | getCharacterRect (const QFont &font, const QChar &ch) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| QList< RPainterPath > | getPainterPathsForBlock (const QString &blockText, const QList< QTextLayout::FormatRange > &formats, double &horizontalAdvance, double &horizontalAdvanceNoSpacing, double &ascent, double &descent) |
| QList< RPainterPath > | getPainterPathsForBlockCad (const QString &blockText, const QList< QTextLayout::FormatRange > &formats, double &horizontalAdvance, double &horizontalAdvanceNoSpacing, double &ascent, double &descent) |
| QList< RPainterPath > | getPainterPathsForBlockTtf (const QString &blockText, const QList< QTextLayout::FormatRange > &formats, double &horizontalAdvance, double &horizontalAdvanceNoSpacing, double &ascent, double &descent) |
| QString | getRichTextForBlock (const QString &blockText, const QList< QTextLayout::FormatRange > &formats) |
Detailed Description
Renders formatted text into painter paths.
- Scriptable:
- This class is wrapped for script environments.
Member Enumeration Documentation
Constructor & Destructor Documentation
Member Function Documentation
| RBox RTextRenderer::getBoundingBox |
( |
| ) |
const |
|
inline |
| QRectF RTextRenderer::getCharacterRect |
( |
const QString & |
fontName, |
|
|
const QChar & |
ch |
|
) |
| const |
|
private |
- Returns:
- Bounding box of the given character with the given font in size '1', rendered at 0/0. Used to find out the CAD relevant height, ascent and descent of the font.
| QRectF RTextRenderer::getCharacterRect |
( |
const QFont & |
font, |
|
|
const QChar & |
ch |
|
) |
| const |
|
private |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| double RTextRenderer::getHeight |
( |
| ) |
const |
|
inline |
| QList<RPainterPath> RTextRenderer::getPainterPaths |
( |
| ) |
const |
|
inline |
| QList< RPainterPath > RTextRenderer::getPainterPathsForBlock |
( |
const QString & |
blockText, |
|
|
const QList< QTextLayout::FormatRange > & |
formats, |
|
|
double & |
horizontalAdvance, |
|
|
double & |
horizontalAdvanceNoSpacing, |
|
|
double & |
ascent, |
|
|
double & |
descent |
|
) |
| |
|
private |
| QList< RPainterPath > RTextRenderer::getPainterPathsForBlockCad |
( |
const QString & |
blockText, |
|
|
const QList< QTextLayout::FormatRange > & |
formats, |
|
|
double & |
horizontalAdvance, |
|
|
double & |
horizontalAdvanceNoSpacing, |
|
|
double & |
ascent, |
|
|
double & |
descent |
|
) |
| |
|
private |
- Returns:
- Painter paths for the given text block in CAD font, positioned at 0/0 (bottom left corner) and with a font size of 1 drawing unit.
| QList< RPainterPath > RTextRenderer::getPainterPathsForBlockTtf |
( |
const QString & |
blockText, |
|
|
const QList< QTextLayout::FormatRange > & |
formats, |
|
|
double & |
horizontalAdvance, |
|
|
double & |
horizontalAdvanceNoSpacing, |
|
|
double & |
ascent, |
|
|
double & |
descent |
|
) |
| |
|
private |
- Returns:
- Painter paths for the given text block in TTF font, positioned at 0/0 (bottom left corner) and with a font size of 1 drawing unit.
| QString RTextRenderer::getRichText |
( |
| ) |
const |
|
inline |
| QString RTextRenderer::getRichTextForBlock |
( |
const QString & |
blockText, |
|
|
const QList< QTextLayout::FormatRange > & |
formats |
|
) |
| |
|
private |
| double RTextRenderer::getWidth |
( |
| ) |
const |
|
inline |
| void RTextRenderer::render |
( |
| ) |
|
Renders the text data into painter paths.
| void RTextRenderer::renderSimple |
( |
| ) |
|
Renders the text data into painter paths.
Member Data Documentation
| QStack<bool> RTextRenderer::blockBold |
|
private |
| QStack<QString> RTextRenderer::blockFont |
|
private |
| QStack<double> RTextRenderer::blockHeight |
|
private |
| QStack<bool> RTextRenderer::blockItalic |
|
private |
| RBox RTextRenderer::boundingBox |
|
private |
| QChar RTextRenderer::chDegree = QChar(0x00b0) |
|
static |
| QChar RTextRenderer::chDiameter = QChar(0x00f8) |
|
static |
| QChar RTextRenderer::chPlusMinus = QChar(0x00b1) |
|
static |
| QStack<QTextCharFormat> RTextRenderer::currentFormat |
|
private |
| bool RTextRenderer::draft |
|
private |
| QString RTextRenderer::escDegree = "%%d" |
|
static |
| QString RTextRenderer::escDiameter = "%%c" |
|
static |
| QString RTextRenderer::escPlusMinus = "%%p" |
|
static |
| double RTextRenderer::fontHeightFactor |
|
private |
| double RTextRenderer::height |
|
private |
| QStack<QStringList> RTextRenderer::openTags |
|
private |
| QString RTextRenderer::richText |
|
private |
| QString RTextRenderer::rxAlignmentChange = "\\\\A(\\d+);" |
|
static |
| QString RTextRenderer::rxAll = ")" |
|
static |
| QString RTextRenderer::rxBackslash = "\\\\\\\\" |
|
static |
| QString RTextRenderer::rxBeginBlock = "\\{" |
|
static |
| QString RTextRenderer::rxColorChangeCustom = "\\\\c(\\d+);" |
|
static |
| QString RTextRenderer::rxColorChangeIndex = "\\\\C(\\d+);" |
|
static |
| QString RTextRenderer::rxCurlyClose = "\\\\\\}" |
|
static |
| QString RTextRenderer::rxCurlyOpen = "\\\\\\{" |
|
static |
| QString RTextRenderer::rxDegree = "%%[dD]" |
|
static |
| QString RTextRenderer::rxDiameter = "%%[cC]" |
|
static |
| QString RTextRenderer::rxEndBlock = "\\}" |
|
static |
| QString RTextRenderer::rxFontChangeCad = "(?:\\\\F([^|]*)\\|c(\\d+);|\\\\F([^|;]*);)" |
|
static |
| QString RTextRenderer::rxFontChangeTtf = "\\\\f([^|]*)\\|b(\\d+)\\|i(\\d+)\\|c(\\d+)\\|p(\\d+);" |
|
static |
| QString RTextRenderer::rxHeightChange = "\\\\H(\\d*\\.?\\d+)(x?);" |
|
static |
| QString RTextRenderer::rxLineFeed = "\\\\p" |
|
static |
| QString RTextRenderer::rxNonBreakingSpace = "\\\\~" |
|
static |
| QString RTextRenderer::rxObliqueAngleChange = "\\\\Q" |
|
static |
| QString RTextRenderer::rxOverlineOff = "\\\\o" |
|
static |
| QString RTextRenderer::rxOverlineOn = "\\\\O" |
|
static |
| QString RTextRenderer::rxParagraphFeed = "\\\\P" |
|
static |
| QString RTextRenderer::rxPlusMinus = "%%[pP]" |
|
static |
| QString RTextRenderer::rxStackedText = "\\\\S([^^]*)\\^([^;]*);" |
|
static |
| QString RTextRenderer::rxTrackChange = "\\\\T" |
|
static |
| QString RTextRenderer::rxUnderlineOff = "\\\\l" |
|
static |
| QString RTextRenderer::rxUnderlineOn = "\\\\L" |
|
static |
| QString RTextRenderer::rxUnicode = "\\\\[Uu]\\+([0-9a-fA-F]{4})" |
|
static |
| QString RTextRenderer::rxWidthChange = "\\\\W" |
|
static |
| QStack<bool> RTextRenderer::useCadFont |
|
private |
| double RTextRenderer::width |
|
private |
The documentation for this class was generated from the following files: