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_brushes_close_popup Popdown the Gimp brush selection.
gimp_brushes_get_brush Retrieve information about the currently active brush mask.
gimp_brushes_get_brush_data Retrieve information about the currently active brush (including data).
gimp_brushes_get_opacity Get the brush opacity.
gimp_brushes_get_paint_mode Get the brush paint mode.
gimp_brushes_get_spacing Get the brush spacing.
gimp_brushes_list Retrieve a complete listing of the available brushes.
gimp_brushes_popup Invokes the Gimp brush selection.
gimp_brushes_refresh Refresh current brushes.
gimp_brushes_set_brush Set the specified brush as the active brush.
gimp_brushes_set_opacity Set the brush opacity.
gimp_brushes_set_paint_mode Set the brush paint mode.
gimp_brushes_set_popup Sets the current brush selection in a popup.
gimp_brushes_set_spacing Set the brush spacing.
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.
script_fu_make_brush_elliptical <Toolbox>/Xtns/Script-Fu/Make Brush/Elliptical...
script_fu_make_brush_elliptical_feathered <Toolbox>/Xtns/Script-Fu/Make Brush/Elliptical, Feathered...
script_fu_make_brush_rectangular <Toolbox>/Xtns/Script-Fu/Make Brush/Rectangular...
script_fu_make_brush_rectangular_feathered <Toolbox>/Xtns/Script-Fu/Make Brush/Rectangular, Feathered...
script_fu_selection_to_brush <Image>/Script-Fu/Selection/To Brush...

gimp_airbrush

Input:
DRAWABLEdrawableThe affected drawable
FLOATpressureThe 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_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 retrieves information about the currently active brush mask. This includes the brush name, the width and height, and the brush spacing paramter. All paint operations and stroke operations use this mask to control the application of paint to the image.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_brushes_get_brush_data

Input:
STRINGnamethe brush name ("" means current active pattern)
Returns:
STRINGnameThe brush name
FLOATopacityThe brush opacity: 0 <= opacity <= 100
INT32spacingThe brush spacing: 0 <= spacing <= 1000
INT32paint_modeThe paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }
INT32widthThe brush width
INT32heightThe brush height
INT32lengthLength of brush mask data
INT8ARRAYmask_dataThe brush mask data
This procedure retrieves information about the currently active brush. This includes the brush name, and the brush extents (width and height). It also returns the brush data.
Andy Thomas; 1998

gimp_brushes_get_opacity

Input: none
Returns:
FLOATopacityThe brush opacity: 0 <= opacity <= 100
This procedure returns the opacity setting for brushes. This value is set globally and will remain the same even if the brush mask is changed. The return value is a floating point number between 0 and 100.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_brushes_get_paint_mode

Input: none
Returns:
INT32paint_modeThe paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }
This procedure returns the paint-mode setting for brushes. This value is set globally and will not change if a different brush is selected. The return value is an integer which corresponds to the values listed in the argument description.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_brushes_get_spacing

Input: none
Returns:
INT32spacingThe brush spacing: 0 <= spacing <= 1000
This procedure returns the spacing setting for brushes. This value is set per brush and will change if a different brush is selected. The return value is an integer between 0 and 1000 which represents percentage of the maximum of the width and height of the mask.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_brushes_list

Input: none
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_brushes_set_brush'.
Spencer Kimball & Peter Mattis; 1995-1996

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
FLOATopacityThe initial opacity of the brush
INT32spacingThe initial spacing of the brush (if < 0 then use brush default spacing)
INT32paint_modeThe initial paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }
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 dialog accordingly.
Seth Burgess; 1997

gimp_brushes_set_brush

Input:
STRINGnameThe brush name
Returns: nothing
This procedure allows the active brush mask to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed brushes. If there is no matching brush found, this procedure will return an error. Otherwise, the specified brush becomes active and will be used in all subsequent paint operations.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_brushes_set_opacity

Input:
FLOATopacityThe brush opacity: 0 <= opacity <= 100
Returns: nothing
This procedure modifies the opacity setting for brushes. This value is set globally and will remain the same even if the brush mask is changed. The value should be a floating point number between 0 and 100.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_brushes_set_paint_mode

Input:
INT32paint_modeThe paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }
Returns: nothing
This procedure modifies the paint_mode setting for the current brush. This value is set globally and will not change if a different brush mask is selected.
Spencer Kimball & Peter Mattis; 1995-1996

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
FLOATopacityThe initial opacity of the brush
INT32spacingThe initial spacing of the brush (if < 0 then use brush default spacing)
INT32paint_modeThe initial paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }
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 modifies the spacing setting for the current brush. This value is set on a per-brush basis and will change if a different brush mask is selected. The value should be a integer between 0 and 1000.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_paintbrush

Input:
DRAWABLEdrawableThe affected drawable
FLOATfade_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 }
INT32methodCONTINUOUS (0) or INCREMENTAL (1)
FLOATgradient_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

script_fu_make_brush_elliptical

Input:
INT32run_modeInteractive, non-interactive
STRINGstringDescription
STRINGvalueWidth
STRINGvalueHeight
STRINGvalueSpacing
Returns: nothing
Create size of brush
Seth Burgess; 1997

script_fu_make_brush_elliptical_feathered

Input:
INT32run_modeInteractive, non-interactive
STRINGstringDescription
STRINGvalueWidth
STRINGvalueHeight
STRINGvalueFeathering
STRINGvalueSpacing
Returns: nothing
Makes a feathered elliptical brush of specified size
Seth Burgess; 1997

script_fu_make_brush_rectangular

Input:
INT32run_modeInteractive, non-interactive
STRINGstringDescription
STRINGvalueWidth
STRINGvalueHeight
STRINGvalueSpacing
Returns: nothing
Create size of brush
Seth Burgess; 1997

script_fu_make_brush_rectangular_feathered

Input:
INT32run_modeInteractive, non-interactive
STRINGstringDescription
STRINGvalueWidth
STRINGvalueHeight
STRINGvalueFeathering
STRINGvalueSpacing
Returns: nothing
Create size of brush
Seth Burgess; 1997


The Gimp 1.2.5 (win32)Documentation fresh from PDB12:10:14 Do 19.06.03
Generated by pdb2doc.py written by Hans Breuer <Hans(at)Breuer.org>