QPaintEngineState Class▲
-
Header: QPaintEngineState
-
Since: Qt 4.1
-
qmake: QT += gui
-
Inherited By:
Detailed Description▲
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 |
---|---|
brush() |
|
QPaintEngine::DirtyClipRegion or QPaintEngine::DirtyClipPath |
|
clipPath() |
|
font() |
|
pen() |
|
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▲
See also QPaintEngine
Member Function Documentation▲
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▲
See also state(), 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▲
See also state(), 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▲
See also state(), QPaintEngine::updateState()
[since 4.3] 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).
This function was introduced in 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▲
See also state(), 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▲
See also state(), 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▲
See also state(), 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▲
See also state(), 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▲
See also state(), 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▲
See also state(), QPaintEngine::updateState()
bool QPaintEngineState::isClipEnabled() const▲
Returns whether 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▲
See also state(), QPaintEngine::updateState()
[since 4.2] qreal QPaintEngineState::opacity() const▲
Returns the opacity in the current paint engine state.
This function was introduced in 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▲
See also state(), QPaintEngine::updateState()
[since 4.3] 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).
This function was introduced in 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▲
See also state(), 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▲
See also QPaintEngine::updateState()
[since 4.3] 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.
This function was introduced in Qt 4.3.
See Also▲
See also state(), QPaintEngine::updateState()
Obsolete Members for QPaintEngineState▲
The following members of class QPaintEngineState are deprecated. We strongly advise against using them in new code.
Obsolete Member Function Documentation▲
[since 4.2] QMatrix QPaintEngineState::matrix() const▲
This function is deprecated. We strongly advise against using it in new code.
Returns the matrix in the current paint engine state.
It is advisable to use transform() instead of this function to preserve the properties of perspective transformations.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyTransform flag.
This function was introduced in Qt 4.2.
See Also▲
See also state(), QPaintEngine::updateState()