BlendPrimitive Class

A primitive that draws its first input over its second one with a blend mode: feBlend of SVG.

public sealed class BlendPrimitive : FilterPrimitive

Remarks

The first input is the source (in) and the second one the backdrop (in2), as in "Compositing and Blending Level 1": with colors cs and cb multiplied by their alpha as and ab, and the blend B of the straight colors (BlendMode), the result is cs (1 - ab) + cb (1 - as) + as ab B, of alpha as + ab - as ab.

Inheritance
FilterPrimitive BlendPrimitive

Constructors

NameDescription
BlendPrimitive(BlendMode, FilterInput)Initializes a new instance of the BlendPrimitive class.

BlendPrimitive(BlendMode, FilterInput)

BlendPrimitive.cs

Initializes a new instance of the BlendPrimitive class.

public BlendPrimitive(BlendMode mode, FilterInput input2)

Parameters

mode BlendMode
The blend mode.
input2 FilterInput
The backdrop: in2.

Exceptions

ArgumentOutOfRangeException
mode is not a defined BlendMode.

Properties

NameDescription
InputGets the source: in.
Input2Gets the backdrop: in2.
ModeGets the blend mode.

Gets the source: in.

public FilterInput Input { get; init; }

Property value

FilterInput

Gets the backdrop: in2.

public FilterInput Input2 { get; }

Property value

FilterInput

Gets the blend mode.

public BlendMode Mode { get; }

Property value

BlendMode