ComponentTransfer.discrete


Description:

[ CCode ( has_construct_function = false ) ]
public ComponentTransfer.discrete (float[] values)

Creates a new component transfer that applies a step function.

The new value is computed as

C' = values[k]

where k is the smallest value such that

k / n <= C < (k + 1) / n

<figure> <picture> <source srcset="discrete-dark.png" media="(prefers-color-scheme: dark)"> <img alt="Component transfer: discrete" src="discrete-light.png"> </picture> </figure>

Parameters:

values

Values

n

Number of values

Returns:

a new `GskComponentTransfer`