The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document's layout. More...
#include <QAbstractTextDocumentLayout>
QRectF | clip |
int | cursorPosition |
QPalette | palette |
QVector<Selection> | selections |
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document's layout.
A paint context is used when rendering custom layouts for QTextDocuments with the QAbstractTextDocumentLayout::draw() function. It is specified by a cursor position, default text color, clip rectangle and a collection of selections.
See also QAbstractTextDocumentLayout.
This variable holds a hint to the layout specifying the area around paragraphs, frames or text require painting.
Everything outside of this rectangle does not need to be painted.
Specifying a clip rectangle can speed up drawing of large documents significantly. Note that the clip rectangle is in document coordinates (not in viewport coordinates). It is not a substitute for a clip region set on the painter but merely a hint.
The default value is a null rectangle indicating everything needs to be painted.
This variable holds the position within the document, where the cursor line should be drawn.
The default value is -1.
This variable holds the default color that is used for the text, when no color is specified.
The default value is the application's default palette.
This variable holds the collection of selections that will be rendered when passing this paint context to QAbstractTextDocumentLayout's draw() function.
The default value is an empty vector indicating no selection.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.