QPaintEngineState¶
The
QPaintEngineState
class provides information about the active paint engine’s current state. More…
Synopsis¶
Functions¶
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
()
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 theDirtyFlags
type which stores an OR combination ofDirtyFlag
values. TheDirtyFlag
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
DirtyBackgroundMode
DirtyBrush
DirtyBrushOrigin
DirtyClipRegion
orDirtyClipPath
DirtyClipPath
DirtyClipRegion
DirtyCompositionMode
DirtyFont
DirtyTransform
DirtyClipEnabled
DirtyPen
DirtyHints
The
QPaintEngineState
class 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.See also
- class PySide2.QtGui.QPaintEngineState¶
- PySide2.QtGui.QPaintEngineState.dirtyFlags¶
- PySide2.QtGui.QPaintEngineState.backgroundBrush()¶
- Return type:
Returns the background brush in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyBackground
flag.See also
- PySide2.QtGui.QPaintEngineState.backgroundMode()¶
- Return type:
Returns the background mode in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyBackgroundMode
flag.See also
- PySide2.QtGui.QPaintEngineState.brush()¶
- Return type:
Returns the brush in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyBrush
flag.See also
- PySide2.QtGui.QPaintEngineState.brushNeedsResolving()¶
- Return type:
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()¶
- Return type:
Returns the brush origin in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyBrushOrigin
flag.See also
- PySide2.QtGui.QPaintEngineState.clipOperation()¶
- Return type:
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 theDirtyClipPath
or theDirtyClipRegion
flag.See also
- PySide2.QtGui.QPaintEngineState.clipPath()¶
- Return type:
Returns the clip path in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyClipPath
flag.See also
- PySide2.QtGui.QPaintEngineState.clipRegion()¶
- Return type:
Returns the clip region in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyClipRegion
flag.See also
- PySide2.QtGui.QPaintEngineState.compositionMode()¶
- Return type:
Returns the composition mode in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyCompositionMode
flag.See also
- PySide2.QtGui.QPaintEngineState.font()¶
- Return type:
Returns the font in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyFont
flag.See also
- PySide2.QtGui.QPaintEngineState.isClipEnabled()¶
- Return type:
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 theDirtyClipEnabled
flag.See also
- PySide2.QtGui.QPaintEngineState.matrix()¶
- Return type:
Note
This function is deprecated.
Use
transform()
instead.Returns the matrix in the current paint engine state.
Note
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 theDirtyTransform
flag.See also
- PySide2.QtGui.QPaintEngineState.opacity()¶
- Return type:
float
Returns the opacity in the current paint engine state.
- PySide2.QtGui.QPaintEngineState.painter()¶
- Return type:
Returns a pointer to the painter currently updating the paint engine.
- PySide2.QtGui.QPaintEngineState.pen()¶
- Return type:
Returns the pen in the current paint engine state.
This variable should only be used when the
state()
returns a combination which includes theDirtyPen
flag.See also
- PySide2.QtGui.QPaintEngineState.penNeedsResolving()¶
- Return type:
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()¶
- Return type:
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 theDirtyHints
flag.See also
- PySide2.QtGui.QPaintEngineState.state()¶
- Return type:
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()
function).See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.