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
Input: none
Returns:
| COLOR | background | The 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:
| STRING | name | The 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:
| STRING | name | The 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:
| COLOR | foreground | The 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:
| STRING | name | The 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:
| SUCCESS | opacity | The 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:
| INT32 | paint_mode | The 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:
| STRING | name | The 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:
| STRING | name | The 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:
| COLOR | background | The 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:
| STRING | name | The 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:
| STRING | name | The 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:
| COLOR | foreground | The 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:
| STRING | name | The 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:
| SUCCESS | opacity | The 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:
| INT32 | paint_mode | The 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:
| STRING | name | The 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:
| STRING | name | The 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:
| STRING | message | Message 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:
| IMAGE | image | The image |
| DRAWABLE | drawable | The affected drawable: (-1 for a new text layer) |
| SUCCESS | x | The x coordinate for the left of the text bounding box |
| SUCCESS | y | The y coordinate for the top of the text bounding box |
| STRING | text | The text to generate (in UTF-8 encoding) |
| INT32 | border | The size of the border: -1 <= border |
| INT32 | antialias | Antialiasing (TRUE or FALSE) |
| SUCCESS | size | The size of text in either pixels or points |
| INT32 | size_type | The units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1) |
| STRING | foundry | The font foundry |
| STRING | family | The font family |
| STRING | weight | The font weight |
| STRING | slant | The font slant |
| STRING | set_width | The font set-width |
| STRING | spacing | The font spacing |
| STRING | registry | The font registry |
| STRING | encoding | The font encoding |
Returns:
| LAYER | text_layer | The new text layer or -1 if no layer was created. |
This procedure is deprecated! Use 'gimp_text_fontname' instead.
;
gimp_text_fontname
Input:
| IMAGE | image | The image |
| DRAWABLE | drawable | The affected drawable: (-1 for a new text layer) |
| SUCCESS | x | The x coordinate for the left of the text bounding box |
| SUCCESS | y | The y coordinate for the top of the text bounding box |
| STRING | text | The text to generate (in UTF-8 encoding) |
| INT32 | border | The size of the border: -1 <= border |
| INT32 | antialias | Antialiasing (TRUE or FALSE) |
| SUCCESS | size | The size of text in either pixels or points |
| INT32 | size_type | The units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1) |
| STRING | fontname | The name of the font |
Returns:
| LAYER | text_layer | The 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:
| STRING | text | The text to generate (in UTF-8 encoding) |
| SUCCESS | size | The size of text in either pixels or points |
| INT32 | size_type | The units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1) |
| STRING | foundry | The font foundry |
| STRING | family | The font family |
| STRING | weight | The font weight |
| STRING | slant | The font slant |
| STRING | set_width | The font set-width |
| STRING | spacing | The font spacing |
| STRING | registry | The font registry |
| STRING | encoding | The font encoding |
Returns:
| INT32 | width | The width of the specified font |
| INT32 | height | The height of the specified font |
| INT32 | ascent | The ascent of the specified font |
| INT32 | descent | The descent of the specified font |
This procedure is deprecated! Use 'gimp_text_get_extents_fontname' instead.
;
gimp_text_get_extents_fontname
Input:
| STRING | text | The text to generate (in UTF-8 encoding) |
| SUCCESS | size | The size of text in either pixels or points |
| INT32 | size_type | The units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1) |
| STRING | fontname | The name of the font |
Returns:
| INT32 | width | The width of the specified font |
| INT32 | height | The height of the specified font |
| INT32 | ascent | The ascent of the specified font |
| INT32 | descent | The 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:
| INT32 | run_mode | Interactive, [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 PDB | 22:53:14 Fr 22.07.2005 |
| Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org> |