Class: QgsPainting

class qgis.core.QgsPainting

Bases: sip.wrapper

Misc painting enums and functions.

New in version 3.0:

Enums

BlendMode

Bases: enum.IntEnum

Methods

getBlendModeEnum

Returns a BlendMode corresponding to a QPainter.CompositionMode

getCompositionMode

Returns a QPainter.CompositionMode corresponding to a BlendMode

isClippingMode

Returns True if mode is a clipping blend mode.

class BlendMode(value)

Bases: enum.IntEnum

Blending modes defining the available composition modes that can be used when painting.

Note

Prior to QGIS 3.30 this was available as QgsPainting.BlendMode.

New in version 3.30.

  • BlendNormal: Normal

  • BlendLighten: Lighten

  • BlendScreen: Screen

  • BlendDodge: Dodge

  • BlendAddition: Addition

  • BlendDarken: Darken

  • BlendMultiply: Multiple

  • BlendBurn: Burn

  • BlendOverlay: Overlay

  • BlendSoftLight: Soft light

  • BlendHardLight: Hard light

  • BlendDifference: Difference

  • BlendSubtract: Subtract

  • BlendSource: Source

  • BlendDestinationOver: Destination over

  • BlendClear: Clear

  • BlendDestination: Destination

  • BlendSourceIn: Source in

  • BlendDestinationIn: Destination in

  • BlendSourceOut: Source out

  • BlendDestinationOut: Destination out

  • BlendSourceAtop: Source atop

  • BlendDestinationAtop: Destination atop

  • BlendXor: XOR

baseClass

alias of Qgis

getBlendModeEnum(blendMode: QPainter.CompositionMode) Qgis.BlendMode

Returns a BlendMode corresponding to a QPainter.CompositionMode

Parameters:

blendMode (QPainter.CompositionMode) –

Return type:

Qgis.BlendMode

getCompositionMode(blendMode: Qgis.BlendMode) QPainter.CompositionMode

Returns a QPainter.CompositionMode corresponding to a BlendMode

Parameters:

blendMode (Qgis.BlendMode) –

Return type:

QPainter.CompositionMode

isClippingMode(mode: Qgis.BlendMode) bool

Returns True if mode is a clipping blend mode.

New in version 3.30.

Parameters:

mode (Qgis.BlendMode) –

Return type:

bool