FilterInput Struct

An input of a primitive of a FilterGraph: the drawing, its alpha, or the result of an earlier primitive.

public readonly struct FilterInput : IEquatable<FilterInput>

Remarks

The default value is FilterInput.Previous.

Implements

Properties

NameDescription
KindGets what the input is.
PreviousGets the result of the primitive before, or the drawing for the first primitive.
ResultIndexGets the index of the primitive whose result the input is, for FilterInputKind.Result; 0 otherwise.
SourceAlphaGets the alpha of the drawing that is filtered, with black colors.
SourceGraphicGets the drawing that is filtered.

Gets what the input is.

public FilterInputKind Kind { get; }

Property value

FilterInputKind

Gets the result of the primitive before, or the drawing for the first primitive.

public static FilterInput Previous { get; }

Property value

FilterInput

ResultIndex

FilterInput.cs

Gets the index of the primitive whose result the input is, for FilterInputKind.Result; 0 otherwise.

public int ResultIndex { get; }

Property value

int

SourceAlpha

FilterInput.cs

Gets the alpha of the drawing that is filtered, with black colors.

public static FilterInput SourceAlpha { get; }

Property value

FilterInput

SourceGraphic

FilterInput.cs

Gets the drawing that is filtered.

public static FilterInput SourceGraphic { get; }

Property value

FilterInput

Methods

NameDescription
Equals(FilterInput)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
FromResult(int)Gets the result of an earlier primitive of the graph.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(FilterInput)

FilterInput.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(FilterInput other)
Parameters
other FilterInput
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

FilterInput.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

FromResult(int)

FilterInput.cs

Gets the result of an earlier primitive of the graph.

public static FilterInput FromResult(int index)

Parameters

index int
The index of the primitive in the graph. It must be before the primitive that reads it.

Returns

FilterInput The input.

Exceptions

ArgumentOutOfRangeException
index is negative.

GetHashCode()

FilterInput.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Operators

NameDescription
operator ==(FilterInput, FilterInput)Compares two inputs for equality.
operator !=(FilterInput, FilterInput)Compares two inputs for inequality.

operator ==(FilterInput, FilterInput)

FilterInput.cs

Compares two inputs for equality.

public static bool operator ==(FilterInput left, FilterInput right)

Parameters

left FilterInput
The first input.
right FilterInput
The second input.

Returns

bool true if they are the same input; otherwise false.

operator !=(FilterInput, FilterInput)

FilterInput.cs

Compares two inputs for inequality.

public static bool operator !=(FilterInput left, FilterInput right)

Parameters

left FilterInput
The first input.
right FilterInput
The second input.

Returns

bool true if they are different inputs; otherwise false.