• PySide 模块
  • PySide.QtGui
  • 内容表

    上一话题

    QPrintEngine

    下一话题

    QPaintEngine

    QPaintEngineState

    详细描述

    PySide.QtGui.QPaintEngineState class provides information about the active paint engine's current state.

    PySide.QtGui.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 PySide.QtGui.QPaintEngineState.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 PySide.QtGui.QPaintEngineState.backgroundBrush()
    QPaintEngine.DirtyBackgroundMode PySide.QtGui.QPaintEngineState.backgroundMode()
    QPaintEngine.DirtyBrush PySide.QtGui.QPaintEngineState.brush()
    QPaintEngine.DirtyBrushOrigin PySide.QtGui.QPaintEngineState.brushOrigin()
    QPaintEngine.DirtyClipRegion or QPaintEngine.DirtyClipPath PySide.QtGui.QPaintEngineState.clipOperation()
    QPaintEngine.DirtyClipPath PySide.QtGui.QPaintEngineState.clipPath()
    QPaintEngine.DirtyClipRegion PySide.QtGui.QPaintEngineState.clipRegion()
    QPaintEngine.DirtyCompositionMode PySide.QtGui.QPaintEngineState.compositionMode()
    QPaintEngine.DirtyFont PySide.QtGui.QPaintEngineState.font()
    QPaintEngine.DirtyTransform PySide.QtGui.QPaintEngineState.transform()
    QPaintEngine.DirtyClipEnabled PySide.QtGui.QPaintEngineState.isClipEnabled()
    QPaintEngine.DirtyPen PySide.QtGui.QPaintEngineState.pen()
    QPaintEngine.DirtyHints PySide.QtGui.QPaintEngineState.renderHints()

    PySide.QtGui.QPaintEngineState class also provide the PySide.QtGui.QPaintEngineState.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.

    class PySide.QtGui. QPaintEngineState
    PySide.QtGui.QPaintEngineState. dirtyFlags
    PySide.QtGui.QPaintEngineState. backgroundBrush ( )
    返回类型: PySide.QtGui.QBrush

    Returns the background brush in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. backgroundMode ( )
    返回类型: PySide.QtCore.Qt.BGMode

    Returns the background mode in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. brush ( )
    返回类型: PySide.QtGui.QBrush

    Returns the brush in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. brushNeedsResolving ( )
    返回类型: PySide.QtCore.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).

    PySide.QtGui.QPaintEngineState. brushOrigin ( )
    返回类型: PySide.QtCore.QPointF

    Returns the brush origin in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. clipOperation ( )
    返回类型: PySide.QtCore.Qt.ClipOperation

    Returns the clip operation in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. clipPath ( )
    返回类型: PySide.QtGui.QPainterPath

    Returns the clip path in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. clipRegion ( )
    返回类型: PySide.QtGui.QRegion

    Returns the clip region in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. compositionMode ( )
    返回类型: PySide.QtGui.QPainter.CompositionMode

    Returns the composition mode in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. font ( )
    返回类型: PySide.QtGui.QFont

    Returns the font in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. isClipEnabled ( )
    返回类型: PySide.QtCore.bool

    Returns whether clipping is enabled or not in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. matrix ( )
    返回类型: PySide.QtGui.QMatrix

    Returns the matrix in the current paint engine state.

    注意

    It is advisable to use PySide.QtGui.QPaintEngineState.transform() instead of this function to preserve the properties of perspective transformations.

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

    PySide.QtGui.QPaintEngineState. opacity ( )
    返回类型: PySide.QtCore.qreal

    Returns the opacity in the current paint engine state.

    PySide.QtGui.QPaintEngineState. painter ( )
    返回类型: PySide.QtGui.QPainter

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

    PySide.QtGui.QPaintEngineState. pen ( )
    返回类型: PySide.QtGui.QPen

    Returns the pen in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. penNeedsResolving ( )
    返回类型: PySide.QtCore.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).

    PySide.QtGui.QPaintEngineState. renderHints ( )
    返回类型: PySide.QtGui.QPainter.RenderHints

    Returns the render hints in the current paint engine state.

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

    PySide.QtGui.QPaintEngineState. state ( )
    返回类型: PySide.QtGui.QPaintEngine.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 QPaintEngine.updateState() 函数)。

    PySide.QtGui.QPaintEngineState. transform ( )
    返回类型: PySide.QtGui.QTransform

    Returns the matrix in the current paint engine state.

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