Gimp.gradient_get_custom_samples

@accepts(unicode, int, [float], bool, int, [float])
@returns(bool)
def gradient_get_custom_samples(name, num_samples, positions, reverse, num_color_samples, color_samples):
    # Python wrapper for gimp_gradient_get_custom_samples()
  

Sample the specified gradient in custom positions.

This procedure samples the active gradient in the specified number of points. The procedure will sample the gradient in the specified positions from the list. The left endpoint of the gradient corresponds to position 0.0, and the right endpoint corresponds to 1.0. The procedure returns a list of floating-point values which correspond to the RGBA values for each sample.

Since 2.2

name

The gradient name.

num_samples

The number of samples to take.

positions

The list of positions to sample along the gradient.

reverse

Use the reverse gradient.

num_color_samples

Length of the color_samples array (4 * num_samples).

color_samples

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

Returns