|
QCAD
Open Source 2D CAD
|
Renders formatted text into painter paths. More...
#include <RTextRenderer.h>
Public Types | |
| enum | Target { PainterPaths = 0x01 , RichText = 0x02 } |
Public Member Functions | |
| RBox | getBoundingBox () const |
| double | getHeight () const |
| QList< RPainterPath > | getPainterPaths () const |
| QString | getRichText () const |
| QList< RTextLayout > | getTextLayouts () const |
| double | getWidth () const |
| void | render () |
| Renders the text data into painter paths. | |
| void | renderSimple () |
| Renders the text data into painter paths. | |
| RTextRenderer (const RTextBasedData &textData, bool draft, RTextRenderer::Target target, double fontHeightFactor=1.0) | |
Static Public Member Functions | |
| static void | lockForDrawing () |
| static void | unlockForDrawing () |
Private Member Functions | |
| bool | getBlockBold () const |
| QString | getBlockFont () const |
| QString | getBlockFontFile () const |
| double | getBlockHeight () const |
| bool | getBlockItalic () const |
| bool | getBlockUnderline () 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. | |
| QRectF | getCharacterRect (const QString &fontName, const QChar &ch) const |
| QTextCharFormat | getCurrentFormat () const |
| QList< RPainterPath > | getPainterPathsForBlock (const QString &blockText, const QList< QTextLayout::FormatRange > &formats, double &horizontalAdvance, double &horizontalAdvanceNoSpacing, double &horizontalAdvanceNoTrailingSpace, double &ascent, double &descent, double &usedHeight) |
| QList< RPainterPath > | getPainterPathsForBlockCad (const QString &blockText, const QList< QTextLayout::FormatRange > &formats, double &horizontalAdvance, double &horizontalAdvanceNoSpacing, double &horizontalAdvanceNoTrailingSpace, double &ascent, double &descent, double &usedHeight) |
| QList< RPainterPath > | getPainterPathsForBlockTtf (const QString &blockText, const QList< QTextLayout::FormatRange > &formats, double &horizontalAdvance, double &horizontalAdvanceNoSpacing, double &horizontalAdvanceNoTrailingSpace, double &ascent, double &descent, double &usedHeight) |
| QString | getRichTextForBlock (const QString &blockText, const QList< QTextLayout::FormatRange > &formats) |
| bool | getUseCadFont () const |
| void | preparePath (RPainterPath &path, const RColor &color, double cursor, double cxfScale) |
| void | preparePathColor (RPainterPath &path, const RColor &color) |
| void | preparePathTransform (RPainterPath &path, double cursor, double cxfScale) |
| void | setBlockBold (bool on) |
| void | setBlockFont (const QString &f) |
| void | setBlockFontFile (const QString &f) |
| void | setBlockHeight (double h) |
| void | setBlockItalic (bool on) |
| void | setBlockUnderline (bool on) |
| void | setCurrentFormat (QTextCharFormat f) |
| void | setUseCadFont (bool on) |
Private Attributes | |
| QStack< bool > | blockBold |
| QStack< QString > | blockFont |
| QStack< QString > | blockFontFile |
| QStack< double > | blockHeight |
| QStack< bool > | blockItalic |
| QStack< bool > | blockUnderline |
| RBox | boundingBox |
| QStack< QTextCharFormat > | currentFormat |
| bool | draft |
| double | fontHeightFactor |
| double | height |
| QList< QTransform > | lineBlockTransforms |
| QStack< QStringList > | openTags |
| QList< RPainterPath > | painterPaths |
| QString | richText |
| Target | target |
| const RTextBasedData & | textData |
| QList< RTextLayout > | textLayouts |
| QStack< bool > | useCadFont |
| double | width |
Static Private Attributes | |
| static QMutex | m |
Renders formatted text into painter paths.
| RTextRenderer::RTextRenderer | ( | const RTextBasedData & | textData, |
| bool | draft, | ||
| RTextRenderer::Target | target, | ||
| double | fontHeightFactor = 1.0 ) |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlineprivate |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
inline |
|
private |
|
inline |
|
inlineprivate |
|
inline |
|
inlinestatic |
|
private |
|
private |
|
private |
| void RTextRenderer::render | ( | ) |
Renders the text data into painter paths.
| void RTextRenderer::renderSimple | ( | ) |
Renders the text data into painter paths.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinestatic |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
Copyright (c) 2011-2018 by Andrew Mustun.
All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD.
|
static |
|
static |
|
private |
|
private |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |