Function

GskComponentTransfernew_discrete

since: 4.20

Declaration [src]

GskComponentTransfer*
gsk_component_transfer_new_discrete (
  guint n,
  float* values
)

Description [src]

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
Component transfer: discrete

.

Available since: 4.20

Parameters

n

Type: guint

Number of values.

values

Type: An array of float

Values.

The length of the array is specified in the n argument.
The data is owned by the caller of the function.

Return value

Type: GskComponentTransfer

A new GskComponentTransfer.

The caller of the function takes ownership of the data, and is responsible for freeing it.