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

The Gimp text functions

gimp_context_get_background Get the current GIMP background color.
gimp_context_get_brush Retrieve the currently active brush.
gimp_context_get_font Retrieve the currently active font.
gimp_context_get_foreground Get the current GIMP foreground color.
gimp_context_get_gradient Retrieve the currently active gradient.
gimp_context_get_opacity Get the opacity.
gimp_context_get_paint_mode Get the paint mode.
gimp_context_get_palette Retrieve the currently active palette.
gimp_context_get_pattern Retrieve the currently active pattern.
gimp_context_pop Pops the topmost context from the plug-in's context stack.
gimp_context_push Pushes a context to the top of the plug-in's context stack.
gimp_context_set_background Set the current GIMP background color.
gimp_context_set_brush Set the specified brush as the active brush.
gimp_context_set_default_colors Set the current GIMP foreground and background colors to black and white.
gimp_context_set_font Set the specified font as the active font.
gimp_context_set_foreground Set the current GIMP foreground color.
gimp_context_set_gradient Sets the specified gradient as the active gradient.
gimp_context_set_opacity Set the opacity.
gimp_context_set_paint_mode Set the paint mode.
gimp_context_set_palette Set the specified palette as the active palette.
gimp_context_set_pattern Set the specified pattern as the active pattern.
gimp_context_swap_colors Swap the current GIMP foreground and background colors.
gimp_progress_set_text Changes the text in the progress bar for the current plug-in.
gimp_text This procedure is deprecated! Use 'gimp_text_fontname' instead.
gimp_text_fontname Add text at the specified location as a floating selection or a new layer.
gimp_text_get_extents This procedure is deprecated! Use 'gimp_text_get_extents_fontname' instead.
gimp_text_get_extents_fontname Get extents of the bounding box for the specified text.
plug_in_script_fu_text_console Provides a text console mode for script-fu development

gimp_context_get_background

Input: none
Returns:
COLORbackgroundThe background color
This procedure returns the current GIMP background color. The background color is used in a variety of tools such as blending, erasing (with non-alpha images), and image filling.
Michael Natterer & Sven Neumann; 2004

gimp_context_get_brush

Input: none
Returns:
STRINGnameThe name of the active brush
This procedure returns the nme of the currently active brush. All paint operations and stroke operations use this brush to control the application of paint to the image.
Michael Natterer & Sven Neumann; 2004

gimp_context_get_font

Input: none
Returns:
STRINGnameThe name of the active font
This procedure returns the name of the currently active font.
Michael Natterer & Sven Neumann; 2004

gimp_context_get_foreground

Input: none
Returns:
COLORforegroundThe foreground color
This procedure returns the current GIMP foreground color. The foreground color is used in a variety of tools such as paint tools, blending, and bucket fill.
Michael Natterer & Sven Neumann; 2004

gimp_context_get_gradient

Input: none
Returns:
STRINGnameThe name of the active gradient
This procedure returns the name of the currently active gradient.
Michael Natterer & Sven Neumann; 2004

gimp_context_get_opacity

Input: none
Returns:
SUCCESSopacityThe opacity: 0 <= opacity <= 100
This procedure returns the opacity setting. The return value is a floating point number between 0 and 100.
Michael Natterer & Sven Neumann; 2004

gimp_context_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 returns the paint-mode setting. The return value is an integer which corresponds to the values listed in the argument description.
Michael Natterer & Sven Neumann; 2004

gimp_context_get_palette

Input: none
Returns:
STRINGnameThe name of the active palette
This procedure returns the name of the the currently active palette.
Michael Natterer & Sven Neumann; 2004

gimp_context_get_pattern

Input: none
Returns:
STRINGnameThe name of the active pattern
This procedure returns name of the the currently active pattern. All clone and bucket-fill operations with patterns will use this pattern to control the application of paint to the image.
Michael Natterer & Sven Neumann; 2004

gimp_context_pop

Input: none
Returns: nothing
This procedure creates a new context and makes it the current context for the calling plug-in.
Michael Natterer & Sven Neumann; 2004

gimp_context_push

Input: none
Returns: nothing
This procedure creates a new context by copying the current context. This copy becomes the new current context for the calling plug-in until it is popped again.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_background

Input:
COLORbackgroundThe background color
Returns: nothing
This procedure sets the current GIMP background color. After this is set, operations which use background such as blending, filling images, clearing, and erasing (in non-alpha images) will use the new value.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_brush

Input:
STRINGnameThe name o the brush
Returns: nothing
This procedure allows the active brush 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.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_default_colors

Input: none
Returns: nothing
This procedure sets the current GIMP foreground and background colors to their initial default values, black and white.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_font

Input:
STRINGnameThe name of the font
Returns: nothing
This procedure allows the active font to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed fonts. If no matching font is found, this procedure will return an error. Otherwise, the specified font becomes active and will be used in all subsequent font operations.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_foreground

Input:
COLORforegroundThe foreground color
Returns: nothing
This procedure sets the current GIMP foreground color. After this is set, operations which use foreground such as paint tools, blending, and bucket fill will use the new value.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_gradient

Input:
STRINGnameThe name of the gradient
Returns: nothing
This procedure lets you set the specified gradient as the active or "current" one. The name is simply a string which corresponds to one of the loaded gradients. If no matching gradient is found, this procedure will return an error. Otherwise, the specified gradient will become active and will be used for subsequent custom gradient operations.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_opacity

Input:
SUCCESSopacityThe opacity: 0 <= opacity <= 100
Returns: nothing
This procedure modifies the opacity setting. The value should be a floating point number between 0 and 100.
Michael Natterer & Sven Neumann; 2004

gimp_context_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 modifies the paint_mode setting.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_palette

Input:
STRINGnameThe name of the palette
Returns: nothing
This procedure allows the active palette to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed palettes. If no matching palette is found, this procedure will return an error. Otherwise, the specified palette becomes active and will be used in all subsequent palette operations.
Michael Natterer & Sven Neumann; 2004

gimp_context_set_pattern

Input:
STRINGnameThe name of the pattern
Returns: nothing
This procedure allows the active pattern to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed patterns. If there is no matching pattern found, this procedure will return an error. Otherwise, the specified pattern becomes active and will be used in all subsequent paint operations.
Michael Natterer & Sven Neumann; 2004

gimp_context_swap_colors

Input: none
Returns: nothing
This procedure swaps the current GIMP foreground and background colors, so that the new foreground color becomes the old background color and vice versa.
Michael Natterer & Sven Neumann; 2004

gimp_progress_set_text

Input:
STRINGmessageMessage to use in the progress dialog
Returns: nothing
This function allows to change the text in the progress bar for the current plug-in. Unlike gimp_progress_init() it does not change the displayed value.
Sven Neumann; 2005

gimp_text

Input:
IMAGEimageThe image
DRAWABLEdrawableThe affected drawable: (-1 for a new text layer)
SUCCESSxThe x coordinate for the left of the text bounding box
SUCCESSyThe y coordinate for the top of the text bounding box
STRINGtextThe text to generate (in UTF-8 encoding)
INT32borderThe size of the border: -1 <= border
INT32antialiasAntialiasing (TRUE or FALSE)
SUCCESSsizeThe size of text in either pixels or points
INT32size_typeThe units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1)
STRINGfoundryThe font foundry
STRINGfamilyThe font family
STRINGweightThe font weight
STRINGslantThe font slant
STRINGset_widthThe font set-width
STRINGspacingThe font spacing
STRINGregistryThe font registry
STRINGencodingThe font encoding
Returns:
LAYERtext_layerThe new text layer or -1 if no layer was created.
This procedure is deprecated! Use 'gimp_text_fontname' instead.
;

gimp_text_fontname

Input:
IMAGEimageThe image
DRAWABLEdrawableThe affected drawable: (-1 for a new text layer)
SUCCESSxThe x coordinate for the left of the text bounding box
SUCCESSyThe y coordinate for the top of the text bounding box
STRINGtextThe text to generate (in UTF-8 encoding)
INT32borderThe size of the border: -1 <= border
INT32antialiasAntialiasing (TRUE or FALSE)
SUCCESSsizeThe size of text in either pixels or points
INT32size_typeThe units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1)
STRINGfontnameThe name of the font
Returns:
LAYERtext_layerThe new text layer or -1 if no layer was created.
This tool requires a fontname matching an installed PangoFT2 font. You can specify the fontsize in units of pixels or points, and the appropriate metric is specified using the size_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the specified drawable parameter is valid, the text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixels.
Spencer Kimball & Peter Mattis; 1998- 2001

gimp_text_get_extents

Input:
STRINGtextThe text to generate (in UTF-8 encoding)
SUCCESSsizeThe size of text in either pixels or points
INT32size_typeThe units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1)
STRINGfoundryThe font foundry
STRINGfamilyThe font family
STRINGweightThe font weight
STRINGslantThe font slant
STRINGset_widthThe font set-width
STRINGspacingThe font spacing
STRINGregistryThe font registry
STRINGencodingThe font encoding
Returns:
INT32widthThe width of the specified font
INT32heightThe height of the specified font
INT32ascentThe ascent of the specified font
INT32descentThe descent of the specified font
This procedure is deprecated! Use 'gimp_text_get_extents_fontname' instead.
;

gimp_text_get_extents_fontname

Input:
STRINGtextThe text to generate (in UTF-8 encoding)
SUCCESSsizeThe size of text in either pixels or points
INT32size_typeThe units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1)
STRINGfontnameThe name of the font
Returns:
INT32widthThe width of the specified font
INT32heightThe height of the specified font
INT32ascentThe ascent of the specified font
INT32descentThe descent of the specified font
This tool returns the width and height of a bounding box for the specified text string with the specified font information. Ascent and descent for the specified font are returned as well.
Spencer Kimball & Peter Mattis; 1998- 2001

plug_in_script_fu_text_console

Input:
INT32run_modeInteractive, [non-interactive]
Returns: nothing
Provides an interface which allows interactive scheme development.
Spencer Kimball & Peter Mattis; 1997


The Gimp 2.3.2 (win32)Documentation fresh from PDB22:53:14 Fr 22.07.2005
Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org>