QPaintEngineStateclass provides information about the active paint engine’s current state. 更多 …
def
backgroundBrush
()
def
backgroundMode
()
def
brush
()
def
brushNeedsResolving
()
def
brushOrigin
()
def
clipOperation
()
def
clipPath
()
def
clipRegion
()
def
compositionMode
()
def
font
()
def
isClipEnabled
()
def
matrix
()
def
opacity
()
def
painter
()
def
pen
()
def
penNeedsResolving
()
def
renderHints
()
def
state
()
def
transform
()
QPaintEngineStaterecords 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 theDirtyFlagstype which stores an OR combination ofDirtyFlagvalues. TheDirtyFlagenum 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
DirtyBackgroundMode
DirtyBrush
DirtyBrushOrigin
DirtyClipRegionorDirtyClipPath
DirtyClipPath
DirtyClipRegion
DirtyCompositionMode
DirtyFont
DirtyTransform
DirtyClipEnabled
DirtyPen
DirtyHints
QPaintEngineStateclass also provide thepainter()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.另请参阅
QPaintEngineState
¶
PySide2.QtGui.QPaintEngineState.
dirtyFlags
¶
PySide2.QtGui.QPaintEngineState.
backgroundBrush
(
)
¶
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
brush
(
)
¶
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
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).
PySide2.QtGui.QPaintEngineState.
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
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
或
DirtyClipRegion
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
clipPath
(
)
¶
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
clipRegion
(
)
¶
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
font
(
)
¶
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
matrix
(
)
¶
注意
此函数被弃用。
使用
transform()
代替。
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
DirtyTransform
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
opacity
(
)
¶
qreal
Returns the opacity in the current paint engine state.
PySide2.QtGui.QPaintEngineState.
painter
(
)
¶
Returns a pointer to the painter currently updating the paint engine.
PySide2.QtGui.QPaintEngineState.
pen
(
)
¶
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
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).
PySide2.QtGui.QPaintEngineState.
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
标志。
另请参阅
PySide2.QtGui.QPaintEngineState.
state
(
)
¶
DirtyFlags
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
updateState()
函数)。
另请参阅