See also: Main Index; Alphabetic; Misc; By Author; By Module; By Menu External Links: The Gimp; Gimp User Manual
The Gimp gradient functions
gimp_gradient_delete
Input:
| STRING | name | The gradient name |
Returns: nothing
This procedure deletes a gradient
Shlomi Fish; 2003
gimp_gradient_duplicate
Input:
| STRING | name | The gradient name |
Returns:
| STRING | name | The name of the gradient's copy |
This procedure creates an identical gradient by a different name
Shlomi Fish; 2003
gimp_gradient_get_custom_samples
Input:
| STRING | name | The gradient name |
| INT32 | num_samples | The number of samples to take |
| FLOATARRAY | positions | The list of positions to sample along the gradient |
| INT32 | reverse | Use the reverse gradient (TRUE or FALSE) |
Returns:
| INT32 | num_color_samples | 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 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_gradient_get_uniform_samples
Input:
| STRING | name | The gradient name |
| INT32 | num_samples | The number of samples to take |
| INT32 | reverse | Use the reverse gradient (TRUE or FALSE) |
Returns:
| INT32 | num_color_samples | 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 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_gradient_is_editable
Input:
| STRING | name | The gradient name |
Returns:
| INT32 | editable | True if the gradient can be edited |
Returns True if you have permission to change the gradient
Bill Skaggs; 2004
gimp_gradient_new
Input:
| STRING | name | The requested name of the new gradient |
Returns:
| STRING | name | The actual new gradient name |
This procedure creates a new, uninitialized gradient
Shlomi Fish; 2003
gimp_gradient_rename
Input:
| STRING | name | The gradient name |
| STRING | new_name | The new name of the gradient |
Returns:
| STRING | name | The actual new name of the gradient |
This procedure renames a gradient
Shlomi Fish; 2003
gimp_gradient_segment_get_blending_function
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
Returns:
| INT32 | blend_func | The blending function of the segment: { GIMP_GRADIENT_SEGMENT_LINEAR (0), GIMP_GRADIENT_SEGMENT_CURVED (1), GIMP_GRADIENT_SEGMENT_SINE (2), GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING (3), GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING (4) } |
This procedure retrieves the blending function of the segment at the specified gradient name and segment index.
Shlomi Fish; 2003
gimp_gradient_segment_get_coloring_type
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
Returns:
| INT32 | coloring_type | The coloring type of the segment: { GIMP_GRADIENT_SEGMENT_RGB (0), GIMP_GRADIENT_SEGMENT_HSV_CCW (1), GIMP_GRADIENT_SEGMENT_HSV_CW (2) } |
This procedure retrieves the coloring type of the segment at the specified gradient name and segment index.
Shlomi Fish; 2003
gimp_gradient_segment_get_left_color
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
Returns:
| COLOR | color | The return color |
| SUCCESS | opacity | The opacity of the endpoint |
This procedure retrieves the left endpoint color of the specified segment of the specified gradient.
Shlomi Fish; 2003
gimp_gradient_segment_get_left_pos
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
Returns:
| SUCCESS | pos | The return position |
This procedure retrieves the left endpoint position of the specified segment of the specified gradient.
Shlomi Fish; 2003
gimp_gradient_segment_get_middle_pos
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
Returns:
| SUCCESS | pos | The return position |
This procedure retrieves the middle point position of the specified segment of the specified gradient.
Shlomi Fish; 2003
gimp_gradient_segment_get_right_color
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
Returns:
| COLOR | color | The return color |
| SUCCESS | opacity | The opacity of the endpoint |
This procedure retrieves the right endpoint color of the specified segment of the specified gradient.
Shlomi Fish; 2003
gimp_gradient_segment_get_right_pos
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
Returns:
| SUCCESS | pos | The return position |
This procedure retrieves the right endpoint position of the specified segment of the specified gradient.
Shlomi Fish; 2003
gimp_gradient_segment_range_blend_colors
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
Returns: nothing
This function blends the colors (but not the opacity) of the segments' range of the gradient. Using it, the colors' transition will be uniform across the range.
Shlomi Fish; 2003
gimp_gradient_segment_range_blend_opacity
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
Returns: nothing
This function blends the opacity (but not the colors) of the segments' range of the gradient. Using it, the opacity's transition will be uniform across the range.
Shlomi Fish; 2003
gimp_gradient_segment_range_delete
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
Returns: nothing
This function deletes a segment range.
Shlomi Fish; 2003
gimp_gradient_segment_range_flip
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
Returns: nothing
This function flips a segment range.
Shlomi Fish; 2003
gimp_gradient_segment_range_move
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
| SUCCESS | delta | The delta to move the segment range |
| INT32 | control_compress | Whether or not to compress the neighboring segments |
Returns:
| SUCCESS | final_delta | The final delta by which the range moved |
This funtions moves the position of an entire segment range by a delta. The actual delta (which is returned) will be limited by the control points of the neighboring segments.
Shlomi Fish; 2003
gimp_gradient_segment_range_redistribute_handles
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
Returns: nothing
This function redistributes the handles of the specified segment range of the specified gradient, so they'll be evenly spaced.
Shlomi Fish; 2003
gimp_gradient_segment_range_replicate
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
| INT32 | replicate_times | The number of times to replicate |
Returns: nothing
This function replicates a segment range a given number of times. Instead of the original segment range, several smaller scaled copies of it will appear in equal widths.
Shlomi Fish; 2003
gimp_gradient_segment_range_set_blending_function
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
| INT32 | blending_function | The Blending Function: { GIMP_GRADIENT_SEGMENT_LINEAR (0), GIMP_GRADIENT_SEGMENT_CURVED (1), GIMP_GRADIENT_SEGMENT_SINE (2), GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING (3), GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING (4) } |
Returns: nothing
This function changes the blending function of a segment range to the specified blending function.
Shlomi Fish; 2003
gimp_gradient_segment_range_set_coloring_type
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
| INT32 | coloring_type | The Coloring Type: { GIMP_GRADIENT_SEGMENT_RGB (0), GIMP_GRADIENT_SEGMENT_HSV_CCW (1), GIMP_GRADIENT_SEGMENT_HSV_CW (2) } |
Returns: nothing
This function changes the coloring type of a segment range to the specified coloring type.
Shlomi Fish; 2003
gimp_gradient_segment_range_split_midpoint
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
Returns: nothing
This function splits each segment in the segment range at its midpoint.
Shlomi Fish; 2003
gimp_gradient_segment_range_split_uniform
Input:
| STRING | name | The gradient name |
| INT32 | start_segment | The index of the first segment to operate on |
| INT32 | end_segment | The index of the last segment to operate on. If negative, the selection will extend to the end of the string. |
| INT32 | split_parts | The number of uniform divisions to split each segment to |
Returns: nothing
This function splits each segment in the segment range uniformly according to the number of times specified by the parameter.
Shlomi Fish; 2003
gimp_gradient_segment_set_left_color
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
| COLOR | color | The color to set |
| SUCCESS | opacity | The opacity to set for the endpoint |
Returns: nothing
This procedure retrieves the left endpoint color of the specified segment of the specified gradient.
Shlomi Fish; 2003
gimp_gradient_segment_set_left_pos
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
| SUCCESS | pos | The position to set the guidepoint in. |
Returns:
| SUCCESS | final_pos | The return position |
This procedure sets the left endpoint position of the specified segment of the specified gradient. The final position will be between the position of the middle point to the left to the middle point of the current segement. This procedure returns the final position.
Shlomi Fish; 2003
gimp_gradient_segment_set_middle_pos
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
| SUCCESS | pos | The position to set the guidepoint in. |
Returns:
| SUCCESS | final_pos | The return position |
This procedure sets the middle point position of the specified segment of the specified gradient. The final position will be between the two endpoints of the segment. This procedure returns the final position.
Shlomi Fish; 2003
gimp_gradient_segment_set_right_color
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
| COLOR | color | The color to set |
| SUCCESS | opacity | The opacity to set for the endpoint |
Returns: nothing
This procedure retrieves the right endpoint color of the specified segment of the specified gradient.
Shlomi Fish; 2003
gimp_gradient_segment_set_right_pos
Input:
| STRING | name | The gradient name |
| INT32 | segment | The index of the segment within the gradient |
| SUCCESS | pos | The position to set the guidepoint in. |
Returns:
| SUCCESS | final_pos | The return position |
This procedure sets the right endpoint position of the specified segment of the specified gradient. The final position will be between the position of the middle point of the current segment and the middle point of the segment to the right. This procedure returns the final position.
Shlomi Fish; 2003
gimp_gradients_close_popup
Input:
| STRING | gradient_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 is deprecated! Use 'gimp_context_get_gradient' instead.
;
gimp_gradients_get_gradient
Input: none
Returns:
| STRING | name | The name of the active gradient |
This procedure is deprecated! Use 'gimp_context_get_gradient' instead.
;
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) |
| INT32 | reverse | Use the reverse gradient (TRUE or FALSE) |
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 is deprecated! Use 'gimp_gradient_get_uniform_samples' instead.
;
gimp_gradients_get_list
Input:
| STRING | filter | An optional regular expression used to filter the list |
Returns:
| INT32 | num_gradients | The number of loaded gradients |
| STRINGARRAY | gradient_list | The list of gradient names |
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.
Federico Mena Quintero; 1997
gimp_gradients_popup
Input:
| STRING | gradient_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_refresh
Input: none
Returns: nothing
This procedure retrieves all gradients currently in the user's gradient path and updates the gradient dialogs accordingly.
Michael Natterer; 2002
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 |
| INT32 | reverse | Use the reverse gradient (TRUE or FALSE) |
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 is deprecated! Use 'gimp_gradient_get_custom_samples' instead.
;
gimp_gradients_sample_uniform
Input:
| INT32 | num_samples | The number of samples to take |
| INT32 | reverse | Use the reverse gradient (TRUE or FALSE) |
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 is deprecated! Use 'gimp_gradient_get_uniform_samples' instead.
;
gimp_gradients_set_active
Input:
| STRING | name | The name of the gradient |
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_gradient' instead.
;
gimp_gradients_set_gradient
Input:
| STRING | name | The name of the gradient |
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_gradient' instead.
;
gimp_gradients_set_popup
Input:
| STRING | gradient_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
| The Gimp 2.3.2 (win32) | Documentation fresh from PDB | 22:53:15 Fr 22.07.2005 |
| Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org> |