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

The Gimp brush functions

gimp_airbrush Paint in the current brush with varying pressure. Paint application is time-dependent.
gimp_airbrush_default Paint in the current brush with varying pressure. Paint application is time-dependent.
gimp_brush_delete Deletes a brush
gimp_brush_duplicate Duplicates a brush
gimp_brush_get_angle Get the rotation angle of a generated brush.
gimp_brush_get_aspect_ratio Get the aspect ratio of a generated brush.
gimp_brush_get_hardness Get the hardness of a generated brush.
gimp_brush_get_info Retrieve information about the specified brush.
gimp_brush_get_pixels Retrieve information about the specified brush.
gimp_brush_get_radius Get the radius of a generated brush.
gimp_brush_get_shape Get the shape of a generated brush.
gimp_brush_get_spacing Get the brush spacing.
gimp_brush_get_spikes Get the number of spikes for a generated brush.
gimp_brush_is_editable Tests if brush can be edited
gimp_brush_is_generated Tests if generated
gimp_brush_new Creates a new brush
gimp_brush_rename Rename a brush
gimp_brush_set_angle Set the rotation angle of a generated brush.
gimp_brush_set_aspect_ratio Set the aspect ratio of a generated brush.
gimp_brush_set_hardness Set the hardness of a generated brush.
gimp_brush_set_radius Set the radius of a generated brush.
gimp_brush_set_shape Set the shape of a generated brush.
gimp_brush_set_spacing Set the brush spacing.
gimp_brush_set_spikes Set the number of spikes for a generated brush.
gimp_brushes_close_popup Popdown the Gimp brush selection.
gimp_brushes_get_brush This procedure is deprecated! Use 'gimp_context_get_brush' instead.
gimp_brushes_get_brush_data This procedure is deprecated! Use 'gimp_brush_get_pixels' instead.
gimp_brushes_get_list Retrieve a complete listing of the available brushes.
gimp_brushes_get_opacity This procedure is deprecated! Use 'gimp_context_get_opacity' instead.
gimp_brushes_get_paint_mode This procedure is deprecated! Use 'gimp_context_get_paint_mode' instead.
gimp_brushes_get_spacing This procedure is deprecated! Use 'gimp_brush_get_spacing' instead.
gimp_brushes_list This procedure is deprecated! Use 'gimp_brushes_get_list' instead.
gimp_brushes_popup Invokes the Gimp brush selection.
gimp_brushes_refresh Refresh current brushes. This function always succeeds.
gimp_brushes_set_brush This procedure is deprecated! Use 'gimp_context_set_brush' instead.
gimp_brushes_set_opacity This procedure is deprecated! Use 'gimp_context_set_opacity' instead.
gimp_brushes_set_paint_mode This procedure is deprecated! Use 'gimp_context_set_paint_mode' instead.
gimp_brushes_set_popup Sets the current brush selection in a popup.
gimp_brushes_set_spacing This procedure is deprecated! Use 'gimp_brush_set_spacing' instead.
gimp_context_get_brush Retrieve the currently active brush.
gimp_context_set_brush Set the specified brush as the active brush.
gimp_paintbrush Paint in the current brush with optional fade out parameter and pull colors from a gradient.
gimp_paintbrush_default Paint in the current brush. The fade out parameter and pull colors from a gradient parameter are set from the paintbrush options dialog. If this dialog has not been activated then the dialog defaults will be used.

gimp_airbrush

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSpressureThe pressure of the airbrush strokes (0 <= pressure <= 100)
INT32num_strokesNumber of stroke control points (count each coordinate as 2 points)
FLOATARRAYstrokesArray of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }
Returns: nothing
This tool simulates the use of an airbrush. Paint pressure represents the relative intensity of the paint application. High pressure results in a thicker layer of paint while low pressure results in a thinner layer.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_airbrush_default

Input:
DRAWABLEdrawableThe affected drawable
INT32num_strokesNumber of stroke control points (count each coordinate as 2 points)
FLOATARRAYstrokesArray of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }
Returns: nothing
This tool simulates the use of an airbrush. It is similar to gimp_airbrush except that the pressure is derived from the airbrush tools options box. It the option has not been set the default for the option will be used.
Andy Thomas; 1999

gimp_brush_delete

Input:
STRINGnameThe brush name
Returns: nothing
This procedure deletes a brush
Michael Natterer; 2004

gimp_brush_duplicate

Input:
STRINGnameThe brush name
Returns:
STRINGnameThe name of the brush's copy
This procedure creates an identical brush by a different name
Michael Natterer; 2004

gimp_brush_get_angle

Input:
STRINGnameThe brush name
Returns:
SUCCESSangleThe rotation angle of the brush.
This procedure gets the angle of rotation for a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brush_get_aspect_ratio

Input:
STRINGnameThe brush name
Returns:
SUCCESSaspect_ratioThe aspect ratio of the brush.
This procedure gets the aspect ratio of a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brush_get_hardness

Input:
STRINGnameThe brush name
Returns:
SUCCESShardnessThe hardness of the brush.
This procedure gets the hardness of a generated brush. The hardness of a brush is the amount its intensity fades at the outside edge. If called for any other type of brush, the function does not succeed.
Bill Skaggs; 2004

gimp_brush_get_info

Input:
STRINGnameThe brush name
Returns:
INT32widthThe brush width
INT32heightThe brush height
INT32mask_bppThe brush mask bpp
INT32color_bppThe brush color bpp
This procedure retrieves information about the specified brush. This includes the brush name, and the brush extents (width and height).
Michael Natterer; 2004

gimp_brush_get_pixels

Input:
STRINGnameThe brush name
Returns:
INT32widthThe brush width
INT32heightThe brush height
INT32mask_bppThe brush mask bpp
INT32num_mask_bytesLength of brush mask data
INT8ARRAYmask_bytesThe brush mask data
INT32color_bppThe brush color bpp
INT32num_color_bytesLength of brush color data
INT8ARRAYcolor_bytesThe brush color data
This procedure retrieves information about the specified brush. This includes the brush extents (width and height) and its pixels data.
Michael Natterer; 2004

gimp_brush_get_radius

Input:
STRINGnameThe brush name
Returns:
SUCCESSradiusThe radius of the brush in pixels
This procedure gets the radius value for a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brush_get_shape

Input:
STRINGnameThe brush name
Returns:
INT32shapeAn enumerated value representing the brush shape
This procedure gets the shape value for a generated brush. If called for any other type of brush, it does not succeed. The current possibilities are Circle (GIMP_BRUSH_GENERATED_CIRCLE), Square (GIMP_BRUSH_GENERATED_SQUARE), and Diamond (GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added in the future.
Bill Skaggs; 2004

gimp_brush_get_spacing

Input:
STRINGnameThe brush name
Returns:
INT32spacingThe brush spacing: 0 <= spacing <= 1000
This procedure returns the spacing setting for the specified brush. The return value is an integer between 0 and 1000 which represents percentage of the maximum of the width and height of the mask.
Michael Natterer; 2004

gimp_brush_get_spikes

Input:
STRINGnameThe brush name
Returns:
INT32spikesThe number of spikes on the brush.
This procedure gets the number of spikes for a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brush_is_editable

Input:
STRINGnameThe brush name
Returns:
INT32editableTrue if the brush can be edited
Returns True if you have permission to change the brush
Bill Skaggs; 2004

gimp_brush_is_generated

Input:
STRINGnameThe brush name
Returns:
INT32generatedTrue if the brush is generated
Returns True if this brush is parametric, False for other types
Bill Skaggs; 2004

gimp_brush_new

Input:
STRINGnameThe requested name of the new brush
Returns:
STRINGnameThe actual new brush name
This procedure creates a new, uninitialized brush
Michael Natterer; 2004

gimp_brush_rename

Input:
STRINGnameThe brush name
STRINGnew_nameThe new name of the brush
Returns:
STRINGnameThe actual new name of the brush
This procedure renames a brush
Michael Natterer; 2004

gimp_brush_set_angle

Input:
STRINGnameThe brush name
SUCCESSangle_inThe desired brush rotation angle
Returns:
SUCCESSangle_outThe brush rotation angle actually assigned
This procedure sets the rotation angle for a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brush_set_aspect_ratio

Input:
STRINGnameThe brush name
SUCCESSaspect_ratio_inThe desired brush aspect ratio
Returns:
SUCCESSaspect_ratio_outThe brush aspect ratio actually assigned
This procedure sets the aspect ratio for a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brush_set_hardness

Input:
STRINGnameThe brush name
SUCCESShardness_inThe desired brush hardness
Returns:
SUCCESShardness_outThe brush hardness actually assigned
This procedure sets the hardness for a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brush_set_radius

Input:
STRINGnameThe brush name
SUCCESSradius_inThe desired brush radius
Returns:
SUCCESSradius_outThe brush radius actually assigned
This procedure sets the radius for a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brush_set_shape

Input:
STRINGnameThe brush name
INT32shape_inAn enumerated value representing the desired brush shape
Returns:
INT32shape_outThe brush shape actually assigned
This procedure sets the shape value for a generated brush. If called for any other type of brush, it does not succeed. The current possibilities are Circle (GIMP_BRUSH_GENERATED_CIRCLE), Square (GIMP_BRUSH_GENERATED_SQUARE), and Diamond (GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added in the future.
Bill Skaggs; 2004

gimp_brush_set_spacing

Input:
STRINGnameThe brush name
INT32spacingThe brush spacing: 0 <= spacing <= 1000
Returns: nothing
This procedure modifies the spacing setting for the specified brush. The value should be a integer between 0 and 1000.
Bill Skaggs; 2004

gimp_brush_set_spikes

Input:
STRINGnameThe brush name
INT32spikes_inThe desired number of spikes
Returns:
INT32spikes_outThe number of spikes actually assigned
This procedure sets the number of spikes for a generated brush. If called for any other type of brush, it does not succeed.
Bill Skaggs; 2004

gimp_brushes_close_popup

Input:
STRINGbrush_callbackThe name of the callback registered for this popup
Returns: nothing
This procedure closes an opened brush selection dialog.
Andy Thomas; 1998

gimp_brushes_get_brush

Input: none
Returns:
STRINGnameThe brush name
INT32widthThe brush width
INT32heightThe brush height
INT32spacingThe brush spacing: 0 <= spacing <= 1000
This procedure is deprecated! Use 'gimp_context_get_brush' instead.
;

gimp_brushes_get_brush_data

Input:
STRINGnameThe brush name ("" means current active brush)
Returns:
STRINGnameThe brush name
SUCCESSopacityThe brush opacity: 0 <= opacity <= 100
INT32spacingThe brush spacing: 0 <= spacing <= 1000
INT32paint_modeThe paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }
INT32widthThe brush width
INT32heightThe brush height
INT32lengthLength of brush mask data
INT8ARRAYmask_dataThe brush mask data
This procedure is deprecated! Use 'gimp_brush_get_pixels' instead.
;

gimp_brushes_get_list

Input:
STRINGfilterAn optional regular expression used to filter the list
Returns:
INT32num_brushesThe number of brushes in the brush list
STRINGARRAYbrush_listThe list of brush names
This procedure returns a complete listing of available GIMP brushes. Each name returned can be used as input to the 'gimp_context_set_brush' procedure.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_brushes_get_opacity

Input: none
Returns:
SUCCESSopacityThe opacity: 0 <= opacity <= 100
This procedure is deprecated! Use 'gimp_context_get_opacity' instead.
;

gimp_brushes_get_paint_mode

Input: none
Returns:
INT32paint_modeThe paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }
This procedure is deprecated! Use 'gimp_context_get_paint_mode' instead.
;

gimp_brushes_get_spacing

Input: none
Returns:
INT32spacingThe brush spacing: 0 <= spacing <= 1000
This procedure is deprecated! Use 'gimp_brush_get_spacing' instead.
;

gimp_brushes_list

Input:
STRINGfilterAn optional regular expression used to filter the list
Returns:
INT32num_brushesThe number of brushes in the brush list
STRINGARRAYbrush_listThe list of brush names
This procedure is deprecated! Use 'gimp_brushes_get_list' instead.
;

gimp_brushes_popup

Input:
STRINGbrush_callbackThe callback PDB proc to call when brush selection is made
STRINGpopup_titleTitle to give the brush popup window
STRINGinitial_brushThe name of the brush to set as the first selected
SUCCESSopacityThe initial opacity of the brush
INT32spacingThe initial spacing of the brush (if < 0 then use brush default spacing)
INT32paint_modeThe initial paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }
Returns: nothing
This procedure popups the brush selection dialog.
Andy Thomas; 1998

gimp_brushes_refresh

Input: none
Returns: nothing
This procedure retrieves all brushes currently in the user's brush path and updates the brush dialogs accordingly.
Seth Burgess; 1997

gimp_brushes_set_brush

Input:
STRINGnameThe name o the brush
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_brush' instead.
;

gimp_brushes_set_opacity

Input:
SUCCESSopacityThe opacity: 0 <= opacity <= 100
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_opacity' instead.
;

gimp_brushes_set_paint_mode

Input:
INT32paint_modeThe paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_paint_mode' instead.
;

gimp_brushes_set_popup

Input:
STRINGbrush_callbackThe name of the callback registered for this popup
STRINGbrush_nameThe name of the brush to set as selected
SUCCESSopacityThe initial opacity of the brush
INT32spacingThe initial spacing of the brush (if < 0 then use brush default spacing)
INT32paint_modeThe initial paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }
Returns: nothing
Sets the current brush selection in a popup.
Andy Thomas; 1998

gimp_brushes_set_spacing

Input:
INT32spacingThe brush spacing: 0 <= spacing <= 1000
Returns: nothing
This procedure is deprecated! Use 'gimp_brush_set_spacing' instead.
;

gimp_paintbrush

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSfade_outFade out parameter: 0 <= fade_out
INT32num_strokesNumber of stroke control points (count each coordinate as 2 points)
FLOATARRAYstrokesArray of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }
INT32methodGIMP_PAINT_CONSTANT (0) or GIMP_PAINT_INCREMENTAL (1)
SUCCESSgradient_lengthLength of gradient to draw: 0 <= gradient_length
Returns: nothing
This tool is the standard paintbrush. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The "fade_out" parameter is measured in pixels and allows the brush stroke to linearly fall off. The pressure is set to the maximum at the beginning of the stroke. As the distance of the stroke nears the fade_out value, the pressure will approach zero. The gradient_length is the distance to spread the gradient over. It is measured in pixels. If the gradient_length is 0, no gradient is used.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_paintbrush_default

Input:
DRAWABLEdrawableThe affected drawable
INT32num_strokesNumber of stroke control points (count each coordinate as 2 points)
FLOATARRAYstrokesArray of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }
Returns: nothing
This tool is similar to the standard paintbrush. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The "fade_out" parameter is measured in pixels and allows the brush stroke to linearly fall off (value obtained from the option dialog). The pressure is set to the maximum at the beginning of the stroke. As the distance of the stroke nears the fade_out value, the pressure will approach zero. The gradient_length (value obtained from the option dialog) is the distance to spread the gradient over. It is measured in pixels. If the gradient_length is 0, no gradient is used.
Andy Thomas; 1999


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>