[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "2.2" ) ]
public Color[] get_uniform_samples (int num_samples, bool reverse)
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 }`.
| this |
The gradient. |
| num_samples |
The number of samples to take. |
| reverse |
Use the reverse gradient. |
|
Color samples. The returned value must be freed with free. |