See also: Main Index; Alphabetic; Misc; By Author; By Module; By Menu    External Links: The Gimp; Gimp User Manual

The Gimp gradient functions

gimp_context_get_gradient Retrieve the currently active gradient.
gimp_context_set_gradient Sets the specified gradient as the active gradient.
gimp_gradient_delete Deletes a gradient
gimp_gradient_duplicate Duplicates a gradient
gimp_gradient_get_custom_samples Sample the spacified gradient in custom positions.
gimp_gradient_get_uniform_samples Sample the specified in uniform parts.
gimp_gradient_is_editable Tests if gradient can be edited
gimp_gradient_new Creates a new gradient
gimp_gradient_rename Rename a gradient
gimp_gradient_segment_get_blending_function Retrieves the gradient segment's blending function
gimp_gradient_segment_get_coloring_type Retrieves the gradient segment's coloring type
gimp_gradient_segment_get_left_color Retrieves the left endpoint color of the specified gradient and segment
gimp_gradient_segment_get_left_pos Retrieves the left endpoint position of the specified gradient and segment
gimp_gradient_segment_get_middle_pos Retrieves the middle point position of the specified gradient and segment
gimp_gradient_segment_get_right_color Retrieves the right endpoint color of the specified gradient and segment
gimp_gradient_segment_get_right_pos Retrieves the right endpoint position of the specified gradient and segment
gimp_gradient_segment_range_blend_colors Blend the colors of the segment range.
gimp_gradient_segment_range_blend_opacity Blend the opacity of the segment range.
gimp_gradient_segment_range_delete Delete the segment range
gimp_gradient_segment_range_flip Flip the segment range
gimp_gradient_segment_range_move Move the position of an entire segment range by a delta.
gimp_gradient_segment_range_redistribute_handles Uniformly redistribute the segment range's handles
gimp_gradient_segment_range_replicate Replicate the segment range
gimp_gradient_segment_range_set_blending_function Change the blending function of a segments range
gimp_gradient_segment_range_set_coloring_type Change the coloring type of a segments range
gimp_gradient_segment_range_split_midpoint Splits each segment in the segment range at midpoint
gimp_gradient_segment_range_split_uniform Splits each segment in the segment range uniformly
gimp_gradient_segment_set_left_color Retrieves the left endpoint color of the specified gradient and segment
gimp_gradient_segment_set_left_pos Sets the left endpoint position of the specified gradient and segment
gimp_gradient_segment_set_middle_pos Sets the middle point position of the specified gradient and segment
gimp_gradient_segment_set_right_color Retrieves the right endpoint color of the specified gradient and segment
gimp_gradient_segment_set_right_pos Sets the right endpoint position of the specified gradient and segment
gimp_gradients_close_popup Popdown the Gimp gradient selection.
gimp_gradients_get_active This procedure is deprecated! Use 'gimp_context_get_gradient' instead.
gimp_gradients_get_gradient This procedure is deprecated! Use 'gimp_context_get_gradient' instead.
gimp_gradients_get_gradient_data This procedure is deprecated! Use 'gimp_gradient_get_uniform_samples' instead.
gimp_gradients_get_list Retrieve the list of loaded gradients.
gimp_gradients_popup Invokes the Gimp gradients selection.
gimp_gradients_refresh Refresh current gradients. This function always succeeds.
gimp_gradients_sample_custom This procedure is deprecated! Use 'gimp_gradient_get_custom_samples' instead.
gimp_gradients_sample_uniform This procedure is deprecated! Use 'gimp_gradient_get_uniform_samples' instead.
gimp_gradients_set_active This procedure is deprecated! Use 'gimp_context_set_gradient' instead.
gimp_gradients_set_gradient This procedure is deprecated! Use 'gimp_context_set_gradient' instead.
gimp_gradients_set_popup Sets the current gradient selection in a popup.

gimp_gradient_delete

Input:
STRINGnameThe gradient name
Returns: nothing
This procedure deletes a gradient
Shlomi Fish; 2003

gimp_gradient_duplicate

Input:
STRINGnameThe gradient name
Returns:
STRINGnameThe 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:
STRINGnameThe gradient name
INT32num_samplesThe number of samples to take
FLOATARRAYpositionsThe list of positions to sample along the gradient
INT32reverseUse the reverse gradient (TRUE or FALSE)
Returns:
INT32num_color_samplesLength of the color_samples array (4 * num_samples)
FLOATARRAYcolor_samplesColor 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:
STRINGnameThe gradient name
INT32num_samplesThe number of samples to take
INT32reverseUse the reverse gradient (TRUE or FALSE)
Returns:
INT32num_color_samplesLength of the color_samples array (4 * num_samples)
FLOATARRAYcolor_samplesColor 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:
STRINGnameThe gradient name
Returns:
INT32editableTrue if the gradient can be edited
Returns True if you have permission to change the gradient
Bill Skaggs; 2004

gimp_gradient_new

Input:
STRINGnameThe requested name of the new gradient
Returns:
STRINGnameThe actual new gradient name
This procedure creates a new, uninitialized gradient
Shlomi Fish; 2003

gimp_gradient_rename

Input:
STRINGnameThe gradient name
STRINGnew_nameThe new name of the gradient
Returns:
STRINGnameThe actual new name of the gradient
This procedure renames a gradient
Shlomi Fish; 2003

gimp_gradient_segment_get_blending_function

Input:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
Returns:
INT32blend_funcThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
Returns:
INT32coloring_typeThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
Returns:
COLORcolorThe return color
SUCCESSopacityThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
Returns:
SUCCESSposThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
Returns:
SUCCESSposThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
Returns:
COLORcolorThe return color
SUCCESSopacityThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
Returns:
SUCCESSposThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe index of the last segment to operate on. If negative, the selection will extend to the end of the string.
SUCCESSdeltaThe delta to move the segment range
INT32control_compressWhether or not to compress the neighboring segments
Returns:
SUCCESSfinal_deltaThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe index of the last segment to operate on. If negative, the selection will extend to the end of the string.
INT32replicate_timesThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe index of the last segment to operate on. If negative, the selection will extend to the end of the string.
INT32blending_functionThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe index of the last segment to operate on. If negative, the selection will extend to the end of the string.
INT32coloring_typeThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe 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:
STRINGnameThe gradient name
INT32start_segmentThe index of the first segment to operate on
INT32end_segmentThe index of the last segment to operate on. If negative, the selection will extend to the end of the string.
INT32split_partsThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
COLORcolorThe color to set
SUCCESSopacityThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
SUCCESSposThe position to set the guidepoint in.
Returns:
SUCCESSfinal_posThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
SUCCESSposThe position to set the guidepoint in.
Returns:
SUCCESSfinal_posThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
COLORcolorThe color to set
SUCCESSopacityThe 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:
STRINGnameThe gradient name
INT32segmentThe index of the segment within the gradient
SUCCESSposThe position to set the guidepoint in.
Returns:
SUCCESSfinal_posThe 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:
STRINGgradient_callbackThe 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:
STRINGnameThe name of the active gradient
This procedure is deprecated! Use 'gimp_context_get_gradient' instead.
;

gimp_gradients_get_gradient

Input: none
Returns:
STRINGnameThe name of the active gradient
This procedure is deprecated! Use 'gimp_context_get_gradient' instead.
;

gimp_gradients_get_gradient_data

Input:
STRINGnameThe gradient name ("" means current active gradient)
INT32sample_sizeSize of the sample to return when the gradient is changed (0 < sample_size <= 10000)
INT32reverseUse the reverse gradient (TRUE or FALSE)
Returns:
STRINGnameThe gradient name
INT32widthThe gradient sample width (r,g,b,a)
FLOATARRAYgrad_dataThe gradient sample data
This procedure is deprecated! Use 'gimp_gradient_get_uniform_samples' instead.
;

gimp_gradients_get_list

Input:
STRINGfilterAn optional regular expression used to filter the list
Returns:
INT32num_gradientsThe number of loaded gradients
STRINGARRAYgradient_listThe 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:
STRINGgradient_callbackThe callback PDB proc to call when gradient selection is made
STRINGpopup_titleTitle to give the gradient popup window
STRINGinitial_gradientThe name of the pattern to set as the first selected
INT32sample_sizeSize 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:
INT32num_samplesThe number of samples to take
FLOATARRAYpositionsThe list of positions to sample along the gradient
INT32reverseUse the reverse gradient (TRUE or FALSE)
Returns:
INT32array_lengthLength of the color_samples array (4 * num_samples)
FLOATARRAYcolor_samplesColor 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:
INT32num_samplesThe number of samples to take
INT32reverseUse the reverse gradient (TRUE or FALSE)
Returns:
INT32array_lengthLength of the color_samples array (4 * num_samples)
FLOATARRAYcolor_samplesColor 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:
STRINGnameThe name of the gradient
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_gradient' instead.
;

gimp_gradients_set_gradient

Input:
STRINGnameThe name of the gradient
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_gradient' instead.
;

gimp_gradients_set_popup

Input:
STRINGgradient_callbackThe name of the callback registered for this popup
STRINGgradient_nameThe 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 PDB22:53:15 Fr 22.07.2005
Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org>