QPaintEngineState

PyQt5.QtGui.QPaintEngineState

Description

The QPaintEngineState class provides information about the active paint engine鈥檚 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 DirtyFlag values. The 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

DirtyBackground

backgroundBrush()

DirtyBackgroundMode

backgroundMode()

DirtyBrush

brush()

DirtyBrushOrigin

brushOrigin()

DirtyClipRegion or DirtyClipPath

clipOperation()

DirtyClipPath

clipPath()

DirtyClipRegion

clipRegion()

DirtyCompositionMode

compositionMode()

DirtyFont

font()

DirtyTransform

transform()

DirtyClipEnabled

isClipEnabled()

DirtyPen

pen()

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

Methods

__init__()

TODO


__init__(QPaintEngineState)

TODO


backgroundBrush() → QBrush

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 DirtyBackground flag.

See also

state(), updateState().


backgroundMode() → BGMode

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 DirtyBackgroundMode flag.

See also

state(), updateState().


brush() → QBrush

Returns the brush in the current paint engine state.

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

See also

state(), updateState().


brushNeedsResolving() → bool

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


brushOrigin() → QPointF

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 DirtyBrushOrigin flag.

See also

state(), updateState().


clipOperation() → ClipOperation

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 DirtyClipPath or the DirtyClipRegion flag.

See also

state(), updateState().


clipPath() → QPainterPath

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 DirtyClipPath flag.

See also

state(), updateState().


clipRegion() → QRegion

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 DirtyClipRegion flag.

See also

state(), updateState().


compositionMode() → CompositionMode

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 DirtyCompositionMode flag.

See also

state(), updateState().


font() → QFont

Returns the font in the current paint engine state.

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

See also

state(), updateState().


isClipEnabled() → bool

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 DirtyClipEnabled flag.

See also

state(), updateState().


opacity() → float

Returns the opacity in the current paint engine state.


painter() → QPainter

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


pen() → QPen

Returns the pen in the current paint engine state.

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

See also

state(), updateState().


penNeedsResolving() → bool

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


renderHints() → RenderHints

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 DirtyHints flag.

See also

state(), updateState().


state() → DirtyFlags

TODO


transform() → QTransform

Returns the matrix in the current paint engine state.

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

See also

state(), updateState().