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

The Gimp unit functions

gimp_image_get_unit Returns the specified image's unit.
gimp_image_set_unit Sets the specified image's unit.
gimp_unit_get_abbreviation Returns the abbreviation of the unit.
gimp_unit_get_deletion_flag Returns the deletion flag of the unit.
gimp_unit_get_digits Returns the number of digits of the unit.
gimp_unit_get_factor Returns the factor of the unit.
gimp_unit_get_identifier Returns the textual identifier of the unit.
gimp_unit_get_number_of_built_in_units Returns the number of built-in units.
gimp_unit_get_number_of_units Returns the number of units.
gimp_unit_get_plural Returns the plural form of the unit.
gimp_unit_get_singular Returns the singular form of the unit.
gimp_unit_get_symbol Returns the symbol of the unit.
gimp_unit_new Creates a new unit and returns it's integer ID.
gimp_unit_set_deletion_flag Sets the deletion flag of a unit.
plug_in_unit_editor The GIMP unit editor (runs in interactive mode only)

gimp_image_get_unit

Input:
IMAGEimageThe image
Returns:
INT32unitThe unit
This procedure returns the specified image's unit. This value is independent of any of the layers in this image. See the gimp_unit_* procedure definitions for the valid range of unit IDs and a description of the unit system.
Michael Natterer; 1998

gimp_image_set_unit

Input:
IMAGEimageThe image
INT32unitThe new image unit
Returns: nothing
This procedure sets the specified image's unit. No scaling or resizing is performed. This value is independent of any of the layers in this image. See the gimp_unit_* procedure definitions for the valid range of unit IDs and a description of the unit system.
Michael Natterer; 1998

gimp_unit_get_abbreviation

Input:
INT32unit_idThe unit's integer ID
Returns:
STRINGabbreviationThe unit's abbreviation
This procedure returns the abbreviation of the unit ("in" for inches).
Michael Natterer; 1999

gimp_unit_get_deletion_flag

Input:
INT32unit_idThe unit's integer ID
Returns:
INT32deletion_flagThe unit's deletion flag
This procedure returns the deletion flag of the unit. If this value is TRUE the unit's definition will not be saved in the user's unitrc file on gimp exit.
Michael Natterer; 1999

gimp_unit_get_digits

Input:
INT32unit_idThe unit's integer ID
Returns:
INT32digitsThe unit's number of digits
This procedure returns the number of digits you should provide in input or output functions to get approximately the same accuracy as with two digits and inches. Note that asking for the digits of "pixels" will produce an error.
Michael Natterer; 1999

gimp_unit_get_factor

Input:
INT32unit_idThe unit's integer ID
Returns:
SUCCESSfactorThe unit's factor
This procedure returns the unit's factor which indicates how many units make up an inch. Note that asking for the factor of "pixels" will produce an error.
Michael Natterer; 1999

gimp_unit_get_identifier

Input:
INT32unit_idThe unit's integer ID
Returns:
STRINGidentifierThe unit's textual identifier
This procedure returns the textual identifier of the unit. For built-in units it will be the english singular form of the unit's name. For user-defined units this should equal to the singular form.
Michael Natterer; 1999

gimp_unit_get_number_of_built_in_units

Input: none
Returns:
INT32num_unitsThe number of built-in units
This procedure returns the number of defined units built-in to the GIMP.
Michael Natterer; 1999

gimp_unit_get_number_of_units

Input: none
Returns:
INT32num_unitsThe number of units
This procedure returns the number of defined units.
Michael Natterer; 1999

gimp_unit_get_plural

Input:
INT32unit_idThe unit's integer ID
Returns:
STRINGpluralThe unit's plural form
This procedure returns the plural form of the unit.
Michael Natterer; 1999

gimp_unit_get_singular

Input:
INT32unit_idThe unit's integer ID
Returns:
STRINGsingularThe unit's singular form
This procedure returns the singular form of the unit.
Michael Natterer; 1999

gimp_unit_get_symbol

Input:
INT32unit_idThe unit's integer ID
Returns:
STRINGsymbolThe unit's symbol
This procedure returns the symbol of the unit ("''" for inches).
Michael Natterer; 1999

gimp_unit_new

Input:
STRINGidentifierThe new unit's identifier
SUCCESSfactorThe new unit's factor
INT32digitsThe new unit's digits
STRINGsymbolThe new unit's symbol
STRINGabbreviationThe new unit's abbreviation
STRINGsingularThe new unit's singular form
STRINGpluralThe new unit's plural form
Returns:
INT32unit_idThe new unit's ID
This procedure creates a new unit and returns it's integer ID. Note that the new unit will have it's deletion flag set to TRUE, so you will have to set it to FALSE with gimp_unit_set_deletion_flag to make it persistent.
Michael Natterer; 1999

gimp_unit_set_deletion_flag

Input:
INT32unit_idThe unit's integer ID
INT32deletion_flagThe new deletion flag of the unit
Returns: nothing
This procedure sets the unit's deletion flag. If the deletion flag of a unit is TRUE on gimp exit, this unit's definition will not be saved in the user's unitrc.
Michael Natterer; 1999

plug_in_unit_editor

Input:
INT32run_modeInteractive
Returns: nothing
The GIMP unit editor (runs in interactive mode only)
Michael Natterer <mitch@gimp.org>; 2000


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>