primo::codecs::AlphaCompositingMode

Defines the way a foreground image will be combined with background video.

enum primo::codecs::AlphaCompositingMode::Enum

Values:

enumerator Over

Foreground over Background - in effect, normal painting operation.

Rrgb = (Fa * Frgb) + (1 - Fa ) * (Ba * Brgb)

Remark

If Fa is foreground alpha, Frgb is foreground RGB, Ba is background alpha, Brgb is background RGB, then Rrgb is the compositing result:

Normally, alpha blending implies a background alpha of 1.0 (Ba = 1.0), so the compositing result Rrgb becomes:

Rrgb = (Fa * Frgb) + (1 - Fa) * Brgb

Fa and Ba are alpha density value with range from 0.0 to 1.0

enumerator In

Foreground in Background - the alpha compositing equivalent of clipping / itersection.

Rrgb = (Fa * Frgb) * Ba

Remark

If Fa is foreground alpha, Frgb is foreground RGB, Ba is background alpha, Brgb is background RGB, then Rrgb is the compositing result:

Fa and Ba are alpha density value with range from 0.0 to 1.0

enumerator Out

Foreground outside Background.

Rrgb = (Fa * Frgb) * (1 - Ba)

Remark

If Fa is foreground alpha, Frgb is foreground RGB, Ba is background alpha, Brgb is background RGB, then Rrgb is the compositing result:

Fa and Ba are alpha density value with range from 0.0 to 1.0

enumerator Atop

Foreground atop Background.

Rrgb = (Fa * Frgb) * Ba + (1 - Fa) * (Ba * Brgb)

Remark

If Fa is foreground alpha, Frgb is foreground RGB, Ba is background alpha, Brgb is background RGB, then Rrgb is the compositing result:

Fa and Ba are alpha density value with range from 0.0 to 1.0

enumerator Xor

Foreground xor Background.

Rrgb = (Fa * Frgb) * (1 - Ba) + (1 - Fa) * (Ba * Brgb)

Remark

If Fa is foreground alpha, Frgb is foreground RGB, Ba is background alpha, Brgb is background RGB, then Rrgb is the compositing result:

Fa and Ba are alpha density value with range from 0.0 to 1.0

enumerator Plus

Foreground plus Background.

Rrgb = (Fa * Frgb) + (Ba * Brgb)

Remark

If Fa is foreground alpha, Frgb is foreground RGB, Ba is background alpha, Brgb is background RGB, then Rrgb is the compositing result:

Fa and Ba are alpha density value with range from 0.0 to 1.0