### Function

# Gimp gradient_get_uniform_samples

since: 2.2

#### Declaration [src]

    gboolean
    gimp_gradient_get_uniform_samples (
      const gchar* name,
      gint num_samples,
      gboolean reverse,
      gint* num_color_samples,
      gdouble** color_samples
    )

#### Description [src]

Sample the specified in uniform parts.

This procedure samples the active gradient in the specified number of uniform parts. It returns a list of floating-point values which correspond to the RGBA values 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

`name`

  Type: `const gchar*`

  The gradient name.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`num_samples`

  Type: `gint`

  The number of samples to take.

`reverse`

  Type: `gboolean`

  Use the reverse gradient.

`num_color_samples`

  Type: `gint*`

  Length of the color_samples array (4 * num_samples).

  The argument will be set by the function.

`color_samples`

  Type: An array of `double`

  Color samples: { R1, G1, B1, A1, …, Rn, Gn, Bn, An }.

  The argument will be set by the function.
  The length of the array is specified in the `num_color_samples` argument.
  The called function takes ownership of the data, and is responsible for freeing it.

#### Return value

Type: `gboolean`

TRUE on success.