Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32.Blend.Modes.Extra🞂ExtraUnit

GR32.Blend.Modes.Extra

Provides utility alpha channel masking and erasing blend modes for Graphics32.

Description ​

The GR32.Blend.Modes.Extra unit provides specialized utility blend modes for alpha-channel manipulation, transparency masking, and image erasing in Graphics32.

Alpha Channel Modulation ​

Unlike standard color blend modes (such as Multiply, Screen, or Overlay) that modify RGB color channels, the extra blend modes (Erase, Mask, and Alpha) preserve the original backdrop RGB color components intact (CR=CB) while directly modulating the backdrop's alpha channel (αB):

  • Erase: Inverse alpha scaling. Reduces backdrop opacity proportional to source opacity (αR=αBâ‹…(1−αS)), creating rubber-erase, cutout, or dissolve effects.
  • Mask: Direct alpha scaling. Masks backdrop opacity proportional to source opacity (αR=αB⋅αS), preserving backdrop colors only where the source mask is opaque.
  • Alpha: Modulates backdrop opacity based on both source alpha and source color intensity (αR=αB⋅αSâ‹…IS), allowing grayscale images or luminance textures to act as dynamic transparency masks.

Summary Table ​

IDNameClassFormula / Behavior
eraseEraseTGraphics32BlenderEraseαR=αB⋅(255−αS)255
maskMaskTGraphics32BlenderMaskαR=αB⋅αS255
alphaAlphaTGraphics32BlenderAlphaαR=αB⋅αS⋅Intensity(S)2552

Extra Blend Modes ​

Erase ​

ID: erase
Name: Erase
Class: TGraphics32BlenderErase

Scales the backdrop alpha channel by the inverse of the source alpha channel (αR=αB⋅(1−αS)). The source RGB color channels are ignored. Painting with an opaque brush (αS=255) completely erases the target backdrop pixel to zero alpha, while semi-transparent brushes partially erase the background.


Mask ​

ID: mask
Name: Mask
Class: TGraphics32BlenderMask

Scales the backdrop alpha channel directly by the source alpha channel (αR=αB⋅αS). The source RGB color channels are ignored. Retains backdrop opacity where the source is opaque, and renders backdrop pixels transparent where the source mask is transparent.


Alpha ​

ID: alpha
Name: Alpha
Class: TGraphics32BlenderAlpha

Scales the backdrop alpha channel by both the source alpha channel and the average RGB color intensity of the source pixel (αR=αB⋅αS⋅RS+GS+BS3). Allows grayscale images, alpha maps, or color textures to serve directly as transparency masks.

See also ​