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 SceneTransferFunctionProperties
| Name | Description |
|---|---|
| Amplitude | Gets the amplitude of a SceneTransferFunctionKind.Gamma function: amplitude. |
| Exponent | Gets the exponent of a SceneTransferFunctionKind.Gamma function: exponent. |
| Identity | Gets the function that keeps the value. |
| Intercept | Gets the intercept of a SceneTransferFunctionKind.Linear function: intercept. |
| Kind | Gets the kind of the function. |
| Offset | Gets the offset of a SceneTransferFunctionKind.Gamma function: offset. |
| Slope | Gets the slope of a SceneTransferFunctionKind.Linear function: slope. |
| Values | Gets the values of the table of a SceneTransferFunctionKind.Table or SceneTransferFunctionKind.Discrete function: tableValues. |
Amplitude
SceneTransferFunction.csGets the amplitude of a SceneTransferFunctionKind.Gamma function: amplitude.
public double Amplitude { get; }Property value
Exponent
SceneTransferFunction.csGets the exponent of a SceneTransferFunctionKind.Gamma function: exponent.
public double Exponent { get; }Property value
Identity
SceneTransferFunction.csGets the function that keeps the value.
public static SceneTransferFunction Identity { get; }Property value
Intercept
SceneTransferFunction.csGets the intercept of a SceneTransferFunctionKind.Linear function: intercept.
public double Intercept { get; }Property value
Offset
SceneTransferFunction.csGets the offset of a SceneTransferFunctionKind.Gamma function: offset.
public double Offset { get; }Property value
Gets the slope of a SceneTransferFunctionKind.Linear function: slope.
public double Slope { get; }Property value
Values
SceneTransferFunction.csGets the values of the table of a SceneTransferFunctionKind.Table or SceneTransferFunctionKind.Discrete function: tableValues.
public IReadOnlyList<double> Values { get; }Property value
Methods
| Name | Description |
|---|---|
| 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.csCreates 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
valuesReadOnlySpan<double>- The values. They are copied.
Returns
SceneTransferFunction The function.
Exceptions
ArgumentException- A value is not a finite number.
CreateGamma(double, double, double)
SceneTransferFunction.csCreates the function amplitude C^exponent + offset.
public static SceneTransferFunction CreateGamma(double amplitude, double exponent, double offset)Parameters
Returns
SceneTransferFunction The function.
Exceptions
ArgumentException- A parameter is not a finite number.
CreateLinear(double, double)
SceneTransferFunction.csCreates the function slope C + intercept.
public static SceneTransferFunction CreateLinear(double slope, double intercept)Parameters
Returns
SceneTransferFunction The function.
Exceptions
ArgumentException- A parameter is not a finite number.
CreateTable(ReadOnlySpan<double>)
SceneTransferFunction.csCreates 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
valuesReadOnlySpan<double>- The values. They are copied.
Returns
SceneTransferFunction The function.
Exceptions
ArgumentException- A value is not a finite number.