Qt:Документация 4.3.2/qabstracttextdocumentlayout-paintcontext

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QAbstractTextDocumentLayout::PaintContext Class Reference
[модуль QtGui ]

The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters of a painter context. More...

 #include <QAbstractTextDocumentLayout>

[править] Public Variables


[править] Подробное описание

The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters of a painter context.

A painter context is used when rendering custom layouts for QTextDocuments with the QAbstractTextDocumentLayout::draw() function, and is specified by a cursor position, a default text color, a clip rectangle and a collection of selections.

See also QAbstractTextDocumentLayout.


[править] Member Variable Documentation

[править]
QRectF PaintContext::clip

This variable holds a hint to the layout avoiding that paragraphs, frames or text that are clearly outside the specified rectangle, are drawn.

Specifying a clip rectangle can speed up drawing of large documents significantly. Note that the clip rectangle is in document coordinates (i.e., not in viewport coordinates), and that it is not a substitute for a clip region set on the painter.

The default value is a null rectangle.

[править]
int PaintContext::cursorPosition

This variable holds the position within the document, where the cursor line should be drawn.

The default value is -1.

[править]
QPalette PaintContext::palette

This variable holds the default color that is used for the text, when no color is specified in the text.

The default value of this variable uses the application's default palette.

[править]
QVector< Selection> PaintContext::selections

This variable holds the collection of selections that will be rendered when passing this painter context to QAbstractTextDocumentLayout's draw() function.

The default value of this variable is an empty vector.


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2