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
Input:
| DRAWABLE | drawable | The affected drawable |
| FLOAT | pressure | The pressure of the airbrush strokes (0 <= pressure <= 100) |
| INT32 | num_strokes | Number of stroke control points (count each coordinate as 2 points) |
| FLOATARRAY | strokes | Array 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:
| DRAWABLE | drawable | The affected drawable |
| INT32 | num_strokes | Number of stroke control points (count each coordinate as 2 points) |
| FLOATARRAY | strokes | Array 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:
| STRING | brush_callback | The 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:
| STRING | name | The brush name |
| INT32 | width | The brush width |
| INT32 | height | The brush height |
| INT32 | spacing | The 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:
| STRING | name | the brush name ("" means current active pattern) |
Returns:
| STRING | name | The brush name |
| FLOAT | opacity | The brush opacity: 0 <= opacity <= 100 |
| INT32 | spacing | The brush spacing: 0 <= spacing <= 1000 |
| INT32 | paint_mode | The 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) } |
| INT32 | width | The brush width |
| INT32 | height | The brush height |
| INT32 | length | Length of brush mask data |
| INT8ARRAY | mask_data | The 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:
| FLOAT | opacity | The 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:
| INT32 | paint_mode | The 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:
| INT32 | spacing | The 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:
| INT32 | num_brushes | The number of brushes in the brush list |
| STRINGARRAY | brush_list | The 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:
| STRING | brush_callback | The callback PDB proc to call when brush selection is made |
| STRING | popup_title | Title to give the brush popup window |
| STRING | initial_brush | The name of the brush to set as the first selected |
| FLOAT | opacity | The initial opacity of the brush |
| INT32 | spacing | The initial spacing of the brush (if < 0 then use brush default spacing) |
| INT32 | paint_mode | The 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:
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:
| FLOAT | opacity | The 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:
| INT32 | paint_mode | The 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:
| STRING | brush_callback | The name of the callback registered for this popup |
| STRING | brush_name | The name of the brush to set as selected |
| FLOAT | opacity | The initial opacity of the brush |
| INT32 | spacing | The initial spacing of the brush (if < 0 then use brush default spacing) |
| INT32 | paint_mode | The 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:
| INT32 | spacing | The 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:
| DRAWABLE | drawable | The affected drawable |
| FLOAT | fade_out | Fade out parameter: 0 <= fade_out |
| INT32 | num_strokes | Number of stroke control points (count each coordinate as 2 points) |
| FLOATARRAY | strokes | Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y } |
| INT32 | method | CONTINUOUS (0) or INCREMENTAL (1) |
| FLOAT | gradient_length | Length 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:
| DRAWABLE | drawable | The affected drawable |
| INT32 | num_strokes | Number of stroke control points (count each coordinate as 2 points) |
| FLOATARRAY | strokes | Array 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:
| INT32 | run_mode | Interactive, non-interactive |
| STRING | string | Description |
| STRING | value | Width |
| STRING | value | Height |
| STRING | value | Spacing |
Returns: nothing
Create size of brush
Seth Burgess; 1997
script_fu_make_brush_elliptical_feathered
Input:
| INT32 | run_mode | Interactive, non-interactive |
| STRING | string | Description |
| STRING | value | Width |
| STRING | value | Height |
| STRING | value | Feathering |
| STRING | value | Spacing |
Returns: nothing
Makes a feathered elliptical brush of specified size
Seth Burgess; 1997
script_fu_make_brush_rectangular
Input:
| INT32 | run_mode | Interactive, non-interactive |
| STRING | string | Description |
| STRING | value | Width |
| STRING | value | Height |
| STRING | value | Spacing |
Returns: nothing
Create size of brush
Seth Burgess; 1997
script_fu_make_brush_rectangular_feathered
Input:
| INT32 | run_mode | Interactive, non-interactive |
| STRING | string | Description |
| STRING | value | Width |
| STRING | value | Height |
| STRING | value | Feathering |
| STRING | value | Spacing |
Returns: nothing
Create size of brush
Seth Burgess; 1997