See also: Main Index; Alphabetic; Misc; By Author; By Module; By Menu External Links: The Gimp; Gimp User Manual
The Gimp gradient functions
gimp_gradients_close_popup
Input:
| STRING | gradients_callback | The name of the callback registered for this popup |
Returns: nothing
This procedure closes an opened gradient selection dialog.
Andy Thomas; 1998
gimp_gradients_get_active
Input: none
Returns:
| STRING | name | The name of the active gradient |
This procedure returns the name of the active gradient in the gradient editor.
Federico Mena Quintero; 1997
gimp_gradients_get_gradient_data
Input:
| STRING | name | The gradient name ("" means current active gradient) |
| INT32 | sample_size | Size of the sample to return when the gradient is changed (0 < sample_size <= 10000) |
Returns:
| STRING | name | The gradient name |
| INT32 | width | The gradient sample width (r,g,b,a) |
| FLOATARRAY | grad_data | The gradient sample data |
This procedure retrieves information about the gradient. This includes the gradient name, and the sample data for the gradient.
Andy Thomas; 1998
gimp_gradients_get_list
Input: none
Returns:
| INT32 | num_gradients | The number of loaded gradients |
| STRINGARRAY | gradient_names | The list of gradient names |
This procedure returns a list of the gradients that are currently loaded in the gradient editor. You can later use the gimp_gradients_set_active function to set the active gradient.
Federico Mena Quintero; 1997
gimp_gradients_popup
Input:
| STRING | gradients_callback | The callback PDB proc to call when gradient selection is made |
| STRING | popup_title | Title to give the gradient popup window |
| STRING | initial_gradient | The name of the pattern to set as the first selected |
| INT32 | sample_size | Size of the sample to return when the gradient is changed (0 < sample_size <= 10000) |
Returns: nothing
This procedure popups the gradients selection dialog.
Andy Thomas; 1998
gimp_gradients_sample_custom
Input:
| INT32 | num_samples | The number of samples to take |
| FLOATARRAY | positions | The list of positions to sample along the gradient |
Returns:
| INT32 | array_length | Length of the color_samples array (4 * num_samples) |
| FLOATARRAY | color_samples | Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An } |
This procedure samples the active gradient from the gradient editor 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.
Federico Mena Quintero; 1997
gimp_gradients_sample_uniform
Input:
| INT32 | num_samples | The number of samples to take |
Returns:
| INT32 | array_length | Length of the color_samples array (4 * num_samples) |
| FLOATARRAY | color_samples | Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An } |
This procedure samples the active gradient from the gradient editor in the specified number of uniform parts. It returns a list of floating-point values which correspond to the RGBA values 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 }.
Federico Mena Quintero; 1997
gimp_gradients_set_active
Input:
| STRING | name | The name of the gradient to set |
Returns: nothing
This procedure lets you set the specified gradient as the active or "current" one. The name is simply a string which corresponds to one of the loaded gradients in the gradient editor. If no matching gradient is found, this procedure will return an error. Otherwise, the specified gradient will become active and will be used for subsequent custom gradient operations.
Federico Mena Quintero; 1997
gimp_gradients_set_popup
Input:
| STRING | gradients_callback | The name of the callback registered for this popup |
| STRING | gradient_name | The name of the gradient to set as selected |
Returns: nothing
Sets the current gradient selection in a popup.
Andy Thomas; 1998
script_fu_gradient_bevel_logo
Input:
| INT32 | run_mode | Interactive, non-interactive |
| STRING | string | Text |
| STRING | value | Font Size (pixels) |
| STRING | font | Font |
| STRING | value | Bevel Height (Sharpness) |
| STRING | value | Bevel Width |
| COLOR | color | Background Color |
Returns: nothing
Makes Shiny Bevelly text
Brian McFee; April 1998
script_fu_gradient_bevel_logo_alpha
Input:
| INT32 | run_mode | Interactive, non-interactive |
| IMAGE | image | Image |
| DRAWABLE | drawable | Drawable |
| STRING | value | Border Size (pixels) |
| STRING | value | Bevel Height (Sharpness) |
| STRING | value | Bevel Width |
| COLOR | color | Background Color |
Returns: nothing
Makes Shiny Bevelly text
Brian McFee; April 1998
script_fu_gradient_example
Input:
| INT32 | run_mode | Interactive, non-interactive |
| STRING | value | Width |
| STRING | value | Height |
Returns: nothing
Create an example image of a custom gradient
Federico Mena Quintero; June 1997