MaskNode#

Added in version 4.10.

class MaskNode(*args, **kwargs)#

Superclasses: RenderNode

A render node masking one child node with another.

Constructors#

class MaskNode
classmethod new(source: RenderNode, mask: RenderNode, mask_mode: MaskMode) MaskNode#

Creates a GskRenderNode that will mask a given node by another.

The mask_mode determines how the ‘mask values’ are derived from the colors of the mask. Applying the mask consists of multiplying the ‘mask value’ with the alpha of the source.

Added in version 4.10.

Parameters:
  • source – The source node to be drawn

  • mask – The node to be used as mask

  • mask_mode – The mask mode to use

Methods#

class MaskNode
get_mask() RenderNode#

Retrieves the mask GskRenderNode child of the node.

Added in version 4.10.

get_mask_mode() MaskMode#

Retrieves the mask mode used by node.

Added in version 4.10.

get_source() RenderNode#

Retrieves the source GskRenderNode child of the node.

Added in version 4.10.