get_custom_samples


Description:

[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "2.2" ) ]
public Color[] get_custom_samples (double[] positions, bool reverse)

Sample the gradient in custom positions.

Samples the color of the gradient at positions from a list. The left endpoint of the gradient corresponds to position 0.0, and the right endpoint corresponds to 1.0. Returns a list of colors, one for each sample.

Parameters:

this

The gradient.

positions

The list of positions to sample along the gradient.

reverse

Use the reverse gradient.

num_samples

The number of samples to take.

Returns:

Color samples. The returned value must be freed with free.