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

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

Версия от 09:36, 29 января 2009; Root (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

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

Image:trolltech-logo.png

Содержание

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

The QPaintEngineState class provides information about the active paint engine's current state. Далее...

 #include <QPaintEngineState>

This class was introduced in Qt 4.1.

[править] Открытые функции


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

The QPaintEngineState class provides information about the active paint engine's current state.

QPaintEngineState records which properties that have changed since the last time the paint engine was updated, as well as their current value.

Which properties that have changed can at any time be retrieved using the state() function. This function returns an instance of the QPaintEngine::DirtyFlags type which stores an OR combination of QPaintEngine::DirtyFlag values. The QPaintEngine::DirtyFlag enum defines whether a property has changed since the last update or not.

If a property is marked with a dirty flag, its current value can be retrieved using the corresponding get function:

Property Flag Current Property Value
QPaintEngine::DirtyBackground backgroundBrush()
QPaintEngine::DirtyBackgroundMode backgroundMode()
QPaintEngine::DirtyBrush brush()
QPaintEngine::DirtyBrushOrigin brushOrigin()
QPaintEngine::DirtyClipRegion or QPaintEngine::DirtyClipPath clipOperation()
QPaintEngine::DirtyClipPath clipPath()
QPaintEngine::DirtyClipRegion clipRegion()
QPaintEngine::DirtyCompositionMode compositionMode()
QPaintEngine::DirtyFont font()
QPaintEngine::DirtyTransform matrix()
QPaintEngine::DirtyClipEnabled isClipEnabled()
QPaintEngine::DirtyPen pen()
QPaintEngine::DirtyHints renderHints()

The QPaintEngineState class also provide the painter() function which returns a pointer to the painter that is currently updating the paint engine.

An instance of this class, representing the current state of the active paint engine, is passed as argument to the QPaintEngine::updateState() function. The only situation in which you will have to use this class directly is when implementing your own paint engine.

See also QPaintEngine.


[править] Описание функций-членов

[править]
QBrush QPaintEngineState::backgroundBrush () const

Returns the background brush in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBackground flag.

See also state() and QPaintEngine::updateState().

[править]
Qt::BGMode QPaintEngineState::backgroundMode () const

Returns the background mode in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBackgroundMode flag.

See also state() and QPaintEngine::updateState().

[править]
QBrush QPaintEngineState::brush () const

Returns the brush in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBrush flag.

See also state() and QPaintEngine::updateState().

[править]
bool QPaintEngineState::brushNeedsResolving () const

Returns whether the coordinate of the fill have been specified as bounded by the current rendering operation and have to be resolved (about the currently rendered primitive).

Эта функция была введена в Qt 4.3.

[править]
QPointF QPaintEngineState::brushOrigin () const

Returns the brush origin in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBrushOrigin flag.

See also state() and QPaintEngine::updateState().

[править]
Qt::ClipOperation QPaintEngineState::clipOperation () const

Returns the clip operation in the current paint engine state.

This variable should only be used when the state() returns a combination which includes either the QPaintEngine::DirtyClipPath or the QPaintEngine::DirtyClipRegion flag.

See also state() and QPaintEngine::updateState().

[править]
QPainterPath QPaintEngineState::clipPath () const

Returns the clip path in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipPath flag.

See also state() and QPaintEngine::updateState().

[править]
QRegion QPaintEngineState::clipRegion () const

Returns the clip region in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipRegion flag.

See also state() and QPaintEngine::updateState().

[править]
QPainter::CompositionMode QPaintEngineState::compositionMode () const

Returns the composition mode in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyCompositionMode flag.

See also state() and QPaintEngine::updateState().

[править]
QFont QPaintEngineState::font () const

Returns the font in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyFont flag.

See also state() and QPaintEngine::updateState().

[править]
bool QPaintEngineState::isClipEnabled () const

Returns wether clipping is enabled or not in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipEnabled flag.

See also state() and QPaintEngine::updateState().

[править]
QMatrix QPaintEngineState::matrix () const

Returns the matrix in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyTransform flag.

Эта функция была введена в Qt 4.2.

See also state() and QPaintEngine::updateState().

[править]
qreal QPaintEngineState::opacity () const

Returns the opacity in the current paint engine state.

Эта функция была введена в Qt 4.2.

[править]
QPainter * QPaintEngineState::painter () const

Returns a pointer to the painter currently updating the paint engine.

[править]
QPen QPaintEngineState::pen () const

Returns the pen in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyPen flag.

See also state() and QPaintEngine::updateState().

[править]
bool QPaintEngineState::penNeedsResolving () const

Returns whether the coordinate of the stroke have been specified as bounded by the current rendering operation and have to be resolved (about the currently rendered primitive).

Эта функция была введена в Qt 4.3.

[править]
QPainter::RenderHints QPaintEngineState::renderHints () const

Returns the render hints in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyHints flag.

See also state() and QPaintEngine::updateState().

[править]
QPaintEngine::DirtyFlags QPaintEngineState::state () const

Returns a combination of flags identifying the set of properties that need to be updated when updating the paint engine's state (i.e. during a call to the QPaintEngine::updateState() function).

See also QPaintEngine::updateState().

[править]
QTransform QPaintEngineState::transform () const

Returns the matrix in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyTransform flag.

Эта функция была введена в Qt 4.3.

See also state() and QPaintEngine::updateState().



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2