Qt 4.8
|
The QTextItem class provides all the information required to draw text in a custom paint engine. More...
#include <qpaintengine.h>
Public Types | |
enum | RenderFlag { RightToLeft = 0x1, Overline = 0x10, Underline = 0x20, StrikeOut = 0x40, Dummy = 0xffffffff } |
Public Functions | |
qreal | ascent () const |
Corresponds to the ascent of the piece of text that is drawn. More... | |
qreal | descent () const |
Corresponds to the descent of the piece of text that is drawn. More... | |
QFont | font () const |
Returns the font that should be used to draw the text. More... | |
RenderFlags | renderFlags () const |
Returns the render flags used. More... | |
QString | text () const |
Returns the text that should be drawn. More... | |
qreal | width () const |
Specifies the total width of the text to be drawn. More... | |
The QTextItem class provides all the information required to draw text in a custom paint engine.
When you reimplement your own paint engine, you must reimplement QPaintEngine::drawTextItem(), a function that takes a QTextItem as one of its arguments.
Definition at line 68 of file qpaintengine.h.
Enumerator | |
---|---|
RightToLeft | |
Overline | |
Underline | |
StrikeOut | |
Dummy |
Definition at line 70 of file qpaintengine.h.
qreal QTextItem::ascent | ( | ) | const |
Corresponds to the ascent of the piece of text that is drawn.
Definition at line 104 of file qpaintengine.cpp.
Referenced by QAlphaPaintEngine::drawTextItem(), QPicturePaintEngine::drawTextItem(), QPaintBufferEngine::drawTextItem(), and QTextItemInt::initWithScriptItem().
qreal QTextItem::descent | ( | ) | const |
Corresponds to the descent of the piece of text that is drawn.
Definition at line 90 of file qpaintengine.cpp.
Referenced by QAlphaPaintEngine::drawTextItem(), QPaintBufferEngine::drawTextItem(), and QTextItemInt::initWithScriptItem().
QFont QTextItem::font | ( | ) | const |
Returns the font that should be used to draw the text.
Definition at line 160 of file qpaintengine.cpp.
Referenced by QPicturePaintEngine::drawTextItem(), QVGPaintEngine::drawTextItem(), QSvgPaintEngine::drawTextItem(), QPaintBufferEngine::drawTextItem(), QStaticTextPrivate::get(), QBlittablePixmapData::markRasterOverlay(), QPainterReplayer::process(), and QTextItemInt::QTextItemInt().
QTextItem::RenderFlags QTextItem::renderFlags | ( | ) | const |
Returns the render flags used.
Definition at line 132 of file qpaintengine.cpp.
Referenced by QPicturePaintEngine::drawTextItem(), and QPaintBufferEngine::drawTextItem().
QString QTextItem::text | ( | ) | const |
Returns the text that should be drawn.
Definition at line 146 of file qpaintengine.cpp.
Referenced by QPaintBuffer::commandDescription(), QDirectFBPaintEngine::drawTextItem(), QPicturePaintEngine::drawTextItem(), QPaintBufferEngine::drawTextItem(), QPainter::drawTextItem(), QBlittablePixmapData::markRasterOverlay(), and QPainterReplayer::process().
qreal QTextItem::width | ( | ) | const |
Specifies the total width of the text to be drawn.
Definition at line 118 of file qpaintengine.cpp.
Referenced by QAlphaPaintEngine::drawTextItem(), QPaintBufferEngine::drawTextItem(), qt_fill_tile(), and glyph_metrics_t::transformed().