CompositePrimitive Class

A primitive that combines two inputs with an operator of Porter and Duff, their sum, or an arithmetic of their components: feComposite of SVG.

public sealed class CompositePrimitive : FilterPrimitive

Remarks

The operators are those of FilterCompositeOperator, on colors multiplied by their alpha. The first input is A (in), the second one B (in2).

Inheritance
FilterPrimitive CompositePrimitive

Constructors

NameDescription
CompositePrimitive(FilterCompositeOperator, FilterInput)Initializes a new instance of the CompositePrimitive class.

CompositePrimitive(FilterCompositeOperator, FilterInput)

CompositePrimitive.cs

Initializes a new instance of the CompositePrimitive class.

public CompositePrimitive(FilterCompositeOperator @operator, FilterInput input2)

Parameters

operator FilterCompositeOperator
The operator.
input2 FilterInput
The second input: in2.

Exceptions

ArgumentOutOfRangeException
operator is not a defined FilterCompositeOperator.

Properties

NameDescription
InputGets the first input: in.
Input2Gets the second input: in2.
K1Gets the factor of the product of the inputs, for FilterCompositeOperator.Arithmetic.
K2Gets the factor of the first input, for FilterCompositeOperator.Arithmetic.
K3Gets the factor of the second input, for FilterCompositeOperator.Arithmetic.
K4Gets the constant, for FilterCompositeOperator.Arithmetic.
OperatorGets the operator.

Gets the first input: in.

public FilterInput Input { get; init; }

Property value

FilterInput

Gets the second input: in2.

public FilterInput Input2 { get; }

Property value

FilterInput

Gets the factor of the product of the inputs, for FilterCompositeOperator.Arithmetic.

public double K1 { get; init; }

Property value

double

Exceptions

ArgumentException
The value is not a finite number.

Gets the factor of the first input, for FilterCompositeOperator.Arithmetic.

public double K2 { get; init; }

Property value

double

Exceptions

ArgumentException
The value is not a finite number.

Gets the factor of the second input, for FilterCompositeOperator.Arithmetic.

public double K3 { get; init; }

Property value

double

Exceptions

ArgumentException
The value is not a finite number.

Gets the constant, for FilterCompositeOperator.Arithmetic.

public double K4 { get; init; }

Property value

double

Exceptions

ArgumentException
The value is not a finite number.

Gets the operator.

public FilterCompositeOperator Operator { get; }