Gsk.ComponentTransfer.new_table
Description: Reference for Gsk.ComponentTransfer.new_table

### Function

# Gsk ComponentTransfernew_table

since: 4.20

#### Declaration [src]

    GskComponentTransfer*
    gsk_component_transfer_new_table (
      guint n,
      float* values
    )

#### Description [src]

Creates a new component transfer that applies a piecewise linear function.

The new value is computed as

    C' = values[k] + (C - k / (n - 1)) * n * (values[k + 1] - values[k])

where k is the smallest value such that

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

.

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.