### Method

# Gimp Gradient get_uniform_samples

since: 2.2

#### Declaration [src]

    GeglColor**
    gimp_gradient_get_uniform_samples (
      GimpGradient* gradient,
      gint num_samples,
      gboolean reverse
    )

#### Description [src]

Sample the gradient in uniform parts.

Samples colors uniformly across the gradient. It returns a list of colors for each sample. The minimum number of samples to take is 2, in which case the returned colors will correspond to the `{ 0.0, 1.0 }` positions in the gradient. For example, if the number of samples is 3, the procedure will return the colors at positions `{ 0.0, 0.5, 1.0 }`.

Available since: 2.2

#### Parameters

`num_samples`

  Type: `gint`

  The number of samples to take.

`reverse`

  Type: `gboolean`

  Use the reverse gradient.

#### Return value

Type: An array of `GeglColor*`

Color samples. The returned value must be freed with gimp_color_array_free().

The array is `NULL`-terminated.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.