CopperSpice API
1.9.2
|
The QTextItem class provides all the information required to draw text in a custom paint engine. More...
Public Typedefs | |
using | RenderFlags = QFlags< RenderFlag > |
Public Types | |
enum | RenderFlag |
Public Methods | |
qreal | ascent () const |
qreal | descent () const |
QFont | font () const |
RenderFlags | renderFlags () const |
QString | text () const |
qreal | width () const |
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.
Typedef for QFlags<RenderFlag> which contains an OR combination of RenderFlag values.
Refer to QTextItem::RenderFlag for the enum documentation.
Constant | Value | Description |
---|---|---|
QTextItem::RightToLeft | 0x1 | Render the text from right to left. |
QTextItem::Overline | 0x10 | Paint a line above the text. |
QTextItem::Underline | 0x20 | Paint a line under the text. |
QTextItem::StrikeOut | 0x40 | Paint a line through the text. |
qreal QTextItem::ascent | ( | ) | const |
Corresponds to the ascent of the piece of text that is drawn.
qreal QTextItem::descent | ( | ) | const |
Corresponds to the descent of the piece of text that is drawn.
QFont QTextItem::font | ( | ) | const |
Returns the font that should be used to draw the text.
RenderFlags QTextItem::renderFlags | ( | ) | const |
Returns the render flags used.
QString QTextItem::text | ( | ) | const |
Returns the text that should be drawn.
qreal QTextItem::width | ( | ) | const |
Specifies the total width of the text to be drawn.