gimpgradients

gimpgradients — Operations related to gradients.

Functions

Description

Operations related to gradients.

Functions

gimp_gradients_refresh ()

gboolean
gimp_gradients_refresh (void);

Refresh current gradients. This function always succeeds.

This procedure retrieves all gradients currently in the user's gradient path and updates the gradient dialogs accordingly.

Returns

TRUE on success.


gimp_gradients_get_list ()

gchar **
gimp_gradients_get_list (const gchar *filter,
                         gint *num_gradients);

Retrieve the list of loaded gradients.

This procedure returns a list of the gradients that are currently loaded. You can later use the gimp_context_set_gradient() function to set the active gradient.

Parameters

filter

An optional regular expression used to filter the list.

 

num_gradients

The number of loaded gradients.

 

Returns

The list of gradient names. The returned value must be freed with g_strfreev().


gimp_gradients_get_gradient ()

gchar *
gimp_gradients_get_gradient (void);

gimp_gradients_get_gradient is deprecated and should not be used in newly-written code.

This procedure is deprecated! Use gimp_context_get_gradient() instead.

Returns

The name of the active gradient.


gimp_gradients_set_gradient ()

gboolean
gimp_gradients_set_gradient (const gchar *name);

gimp_gradients_set_gradient is deprecated and should not be used in newly-written code.

This procedure is deprecated! Use gimp_context_set_gradient() instead.

Parameters

name

The name of the gradient to set.

 

Returns

TRUE on success.


gimp_gradients_sample_uniform ()

gdouble *
gimp_gradients_sample_uniform (gint num_samples,
                               gboolean reverse);

gimp_gradients_sample_uniform is deprecated and should not be used in newly-written code.

Use gimp_gradient_get_uniform_samples() instead.

Parameters

num_samples

The number of samples to take.

 

reverse

Use the reverse gradient.

 

Returns

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


gimp_gradients_sample_custom ()

gdouble *
gimp_gradients_sample_custom (gint num_samples,
                              const gdouble *positions,
                              gboolean reverse);

gimp_gradients_sample_custom is deprecated and should not be used in newly-written code.

Use gimp_gradient_get_custom_samples() instead.

Parameters

num_samples

The number of samples to take.

 

positions

The list of positions to sample along the gradient.

 

reverse

Use the reverse gradient.

 

Returns

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


gimp_gradients_get_gradient_data ()

gchar *
gimp_gradients_get_gradient_data (const gchar *name,
                                  gint sample_size,
                                  gboolean reverse,
                                  gint *width,
                                  gdouble **grad_data);

gimp_gradients_get_gradient_data is deprecated and should not be used in newly-written code.

Use gimp_gradient_get_uniform_samples() instead.

Parameters

name

The gradient name (\"\" means current active gradient).

 

sample_size

Size of the sample to return when the gradient is changed.

 

reverse

Use the reverse gradient.

 

width

The gradient sample width (r,g,b,a).

 

grad_data

The gradient sample data.

 

Returns

The gradient name.