QPaintEngineState Class Reference

[ QtGui module]

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

方法


详细描述

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 使用 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 transform ()
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.


方法文档编制

QPaintEngineState.__init__ ( self )

QPaintEngineState.__init__ ( self , QPaintEngineState )

QBrush QPaintEngineState.backgroundBrush ( self )

Returns the background brush in the current paint engine 状态。

This variable should only be used when the state () returns a combination which includes the QPaintEngine.DirtyBackground 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

Qt.BGMode QPaintEngineState.backgroundMode ( self )

Returns the background mode in the current paint engine 状态。

This variable should only be used when the state () returns a combination which includes the QPaintEngine.DirtyBackgroundMode 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

QBrush QPaintEngineState.brush ( self )

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 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

bool QPaintEngineState.brushNeedsResolving ( self )

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 ( self )

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 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

Qt.ClipOperation QPaintEngineState.clipOperation ( self )

Returns the clip operation in the current paint engine 状态。

This variable should only be used when the state () returns a combination which includes either the QPaintEngine.DirtyClipPath QPaintEngine.DirtyClipRegion 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

QPainterPath QPaintEngineState.clipPath ( self )

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 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

QRegion QPaintEngineState.clipRegion ( self )

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 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

QPainter.CompositionMode QPaintEngineState.compositionMode ( self )

Returns the composition mode in the current paint engine 状态。

This variable should only be used when the state () returns a combination which includes the QPaintEngine.DirtyCompositionMode 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

QFont QPaintEngineState.font ( self )

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 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

bool QPaintEngineState.isClipEnabled ( self )

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 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

QMatrix QPaintEngineState.matrix ( self )

float QPaintEngineState.opacity ( self )

Returns the opacity in the current paint engine state.

该函数在 Qt 4.2 引入。

QPainter QPaintEngineState.painter ( self )

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

QPen QPaintEngineState.pen ( self )

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 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

bool QPaintEngineState.penNeedsResolving ( self )

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 ( self )

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 标志。

另请参阅 state () 和 QPaintEngine.updateState ().

QPaintEngine.DirtyFlags QPaintEngineState.state ( self )

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 () 函数)。

另请参阅 QPaintEngine.updateState ().

QTransform QPaintEngineState.transform ( self )

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 标志。

该函数在 Qt 4.3 引入。

另请参阅 state () 和 QPaintEngine.updateState ().