Gsk.ComponentTransfer.new_levels
Description: Reference for Gsk.ComponentTransfer.new_levels

### Function

# Gsk ComponentTransfernew_levels

since: 4.20

#### Declaration [src]

    GskComponentTransfer*
    gsk_component_transfer_new_levels (
      float n
    )

#### Description [src]

Creates a new component transfer that limits the values of the component to `n` levels.

The new value is computed as

    C' = (floor (C * n) + 0.5) / n

.

Available since: 4.20

#### Parameters

`n`

  Type: `float`

  Number of levels.

#### Return value

Type: `GskComponentTransfer`

A new `GskComponentTransfer`.

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