A text engine is responsible for rendering texts for a specific text format. They are used by QwtText to render a text.
QwtPlainTextEngine and QwtRichTextEngine are part of the Qwt library.
QwtMathMLTextEngine can be found in Qwt MathML extension, that needs the MathML renderer of the Qt solutions package. Unfortunately it is only available with a commercial Qt license.
Test if a string can be rendered by this text engine
Parameters:
text Text to be tested
Returns:
true, if it can be rendered
Implemented in QwtPlainTextEngine, QwtRichTextEngine, and QwtMathMLTextEngine.
virtual void QwtTextEngine::textMargins (const QFont & font, const QString & text, int & left, int & right, int & top, int & bottom) const [pure virtual]
Return margins around the texts
The textSize might include margins around the text, like QFontMetrics::descent. In situations where texts need to be aligend in detail, knowing these margins might improve the layout calculations.
Parameters:
font Font of the text
text Text to be rendered
left Return value for the left margin
right Return value for the right margin
top Return value for the top margin
bottom Return value for the bottom margin
Implemented in QwtPlainTextEngine, QwtRichTextEngine, and QwtMathMLTextEngine.