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
Input:
Returns:
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:
| IMAGE | image | The image |
| INT32 | unit | The 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:
| INT32 | unit_id | The unit's integer ID |
Returns:
| STRING | abbreviation | The unit's abbreviation |
This procedure returns the abbreviation of the unit ("in" for inches).
Michael Natterer; 1999
gimp_unit_get_deletion_flag
Input:
| INT32 | unit_id | The unit's integer ID |
Returns:
| INT32 | deletion_flag | The 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:
| INT32 | unit_id | The unit's integer ID |
Returns:
| INT32 | digits | The 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:
| INT32 | unit_id | The unit's integer ID |
Returns:
| SUCCESS | factor | The 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:
| INT32 | unit_id | The unit's integer ID |
Returns:
| STRING | identifier | The 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:
| INT32 | num_units | The 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:
| INT32 | num_units | The number of units |
This procedure returns the number of defined units.
Michael Natterer; 1999
gimp_unit_get_plural
Input:
| INT32 | unit_id | The unit's integer ID |
Returns:
| STRING | plural | The unit's plural form |
This procedure returns the plural form of the unit.
Michael Natterer; 1999
gimp_unit_get_singular
Input:
| INT32 | unit_id | The unit's integer ID |
Returns:
| STRING | singular | The unit's singular form |
This procedure returns the singular form of the unit.
Michael Natterer; 1999
gimp_unit_get_symbol
Input:
| INT32 | unit_id | The unit's integer ID |
Returns:
| STRING | symbol | The unit's symbol |
This procedure returns the symbol of the unit ("''" for inches).
Michael Natterer; 1999
gimp_unit_new
Input:
| STRING | identifier | The new unit's identifier |
| SUCCESS | factor | The new unit's factor |
| INT32 | digits | The new unit's digits |
| STRING | symbol | The new unit's symbol |
| STRING | abbreviation | The new unit's abbreviation |
| STRING | singular | The new unit's singular form |
| STRING | plural | The new unit's plural form |
Returns:
| INT32 | unit_id | The 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:
| INT32 | unit_id | The unit's integer ID |
| INT32 | deletion_flag | The 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:
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 PDB | 22:53:14 Fr 22.07.2005 |
| Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org> |