SceneTransferFunction Class

A function of a component of a SceneComponentTransferPrimitive: feFuncR, feFuncG, feFuncB or feFuncA of SVG. It applies to the colors without their alpha, from 0 to 1, and its result is clamped to that range.

public sealed class SceneTransferFunction

Properties

NameDescription
AmplitudeGets the amplitude of a SceneTransferFunctionKind.Gamma function: amplitude.
ExponentGets the exponent of a SceneTransferFunctionKind.Gamma function: exponent.
IdentityGets the function that keeps the value.
InterceptGets the intercept of a SceneTransferFunctionKind.Linear function: intercept.
KindGets the kind of the function.
OffsetGets the offset of a SceneTransferFunctionKind.Gamma function: offset.
SlopeGets the slope of a SceneTransferFunctionKind.Linear function: slope.
ValuesGets the values of the table of a SceneTransferFunctionKind.Table or SceneTransferFunctionKind.Discrete function: tableValues.

Gets the amplitude of a SceneTransferFunctionKind.Gamma function: amplitude.

public double Amplitude { get; }

Property value

double

Gets the exponent of a SceneTransferFunctionKind.Gamma function: exponent.

public double Exponent { get; }

Property value

double

Gets the function that keeps the value.

public static SceneTransferFunction Identity { get; }

Property value

SceneTransferFunction

Gets the intercept of a SceneTransferFunctionKind.Linear function: intercept.

public double Intercept { get; }

Property value

double

Gets the kind of the function.

public SceneTransferFunctionKind Kind { get; }

Gets the offset of a SceneTransferFunctionKind.Gamma function: offset.

public double Offset { get; }

Property value

double

Gets the slope of a SceneTransferFunctionKind.Linear function: slope.

public double Slope { get; }

Property value

double

Gets the values of the table of a SceneTransferFunctionKind.Table or SceneTransferFunctionKind.Discrete function: tableValues.

public IReadOnlyList<double> Values { get; }

Property value

IReadOnlyList<double>

Methods

NameDescription
CreateDiscrete(ReadOnlySpan<double>)Creates a function whose value is the value of the step it is in: n values divide the range from 0 to 1 in n steps. An empty table keeps the value.
CreateGamma(double, double, double)Creates the function amplitude C^exponent + offset.
CreateLinear(double, double)Creates the function slope C + intercept.
CreateTable(ReadOnlySpan<double>)Creates a function that interpolates linearly between the values of a table, spread evenly from 0 to 1. An empty table keeps the value.

CreateDiscrete(ReadOnlySpan<double>)

SceneTransferFunction.cs

Creates a function whose value is the value of the step it is in: n values divide the range from 0 to 1 in n steps. An empty table keeps the value.

public static SceneTransferFunction CreateDiscrete(params scoped ReadOnlySpan<double> values)

Parameters

values ReadOnlySpan<double>
The values. They are copied.

Returns

SceneTransferFunction The function.

Exceptions

ArgumentException
A value is not a finite number.

CreateGamma(double, double, double)

SceneTransferFunction.cs

Creates the function amplitude C^exponent + offset.

public static SceneTransferFunction CreateGamma(double amplitude, double exponent, double offset)

Parameters

amplitude double
The amplitude.
exponent double
The exponent.
offset double
The offset.

Returns

SceneTransferFunction The function.

Exceptions

ArgumentException
A parameter is not a finite number.

CreateLinear(double, double)

SceneTransferFunction.cs

Creates the function slope C + intercept.

public static SceneTransferFunction CreateLinear(double slope, double intercept)

Parameters

slope double
The slope.
intercept double
The intercept.

Returns

SceneTransferFunction The function.

Exceptions

ArgumentException
A parameter is not a finite number.

CreateTable(ReadOnlySpan<double>)

SceneTransferFunction.cs

Creates a function that interpolates linearly between the values of a table, spread evenly from 0 to 1. An empty table keeps the value.

public static SceneTransferFunction CreateTable(params scoped ReadOnlySpan<double> values)

Parameters

values ReadOnlySpan<double>
The values. They are copied.

Returns

SceneTransferFunction The function.

Exceptions

ArgumentException
A value is not a finite number.