|  | Home · Overviews · Examples |

# QPaintEngineState Class Reference
[com.trolltech.qt.gui module]

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

## Detailed Description

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`.