Method
GimpGradientget_custom_samples
Declaration [src]
gboolean
gimp_gradient_get_custom_samples (
GimpGradient* gradient,
gint num_samples,
const gdouble* positions,
gboolean reverse,
gint* num_color_samples,
gdouble** color_samples
)
Description [src]
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 floating-point values, four for each sample (RGBA.)
Available since: | 2.2 |
Parameters
num_samples |
gint |
The number of samples to take. |
|
positions |
An array of double |
The list of positions to sample along the gradient. |
|
The length of the array is specified in the num_samples argument. | |
The data is owned by the caller of the function. | |
reverse |
gboolean |
Use the reverse gradient. |
|
num_color_samples |
gint* |
Length of the color_samples array (4 * num_samples). |
|
The argument will be set by the function. | |
color_samples |
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 instance takes ownership of the data, and is responsible for freeing it. |