GIMP Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
gimpunit
Name
gimpunit -- Provides a collection of predefined units and functions for creating user-defined units.Synopsis
enum GimpUnit; |
Details
enum GimpUnit
typedef enum { GIMP_UNIT_PIXEL = 0, GIMP_UNIT_INCH = 1, GIMP_UNIT_MM = 2, GIMP_UNIT_POINT = 3, GIMP_UNIT_PICA = 4, GIMP_UNIT_END = 5, GIMP_UNIT_PERCENT = 65536 } GimpUnit; |
gimp_unit_get_number_of_units ()
|
Returns the number of units which are known to the GimpUnit system.
gimp_unit_get_number_of_built_in_units ()
|
Returns the number of GimpUnit's which are hardcoded in the unit system (UNIT_INCH, UNIT_MM, UNIT_POINT, UNIT_PICA and the two "pseudo unit" UNIT_PIXEL).
gimp_unit_new ()
GimpUnit gimp_unit_new ( |
Returns the integer ID of the new GimpUnit.
Note that a new unit is always created with it's deletion flag
set to
identifier : | The unit's identifier string. |
factor : | The unit's factor (how many units are in one inch). |
digits : | The unit's suggested number of digits (see gimp_unit_get_digits()). |
symbol : | The symbol of the unit (e.g. "''" for inch). |
abbreviation : | The abbreviation of the unit. |
singular : | The singular form of the unit. |
plural : | The plural form of the unit. |
Returns : | The ID of the new unit. |
gimp_unit_set_deletion_flag ()
void gimp_unit_set_deletion_flag (GimpUnit unit, |
Sets a GimpUnit's deletion_flag. If the deletion_flag of a unit is
Trying to change the deletion_flag of a built-in unit will be silently ignored.
gimp_unit_get_factor ()
|
A GimpUnit's factor is defined to be:
distance_in_units == (factor * distance_in_inches)
Returns 0 for unit == GIMP_UNIT_PIXEL.
gimp_unit_get_digits ()
|
Returns the number of digits an entry field should provide to get approximately the same accuracy as an inch input field with two digits.
Returns 0 for unit == GIMP_UNIT_PIXEL.
gimp_unit_get_identifier ()
|
This is an unstranslated string.
NOTE: This string has to be
gimp_unit_get_symbol ()
|
This is e.g. "''" for UNIT_INCH.
NOTE: This string has to be
gimp_unit_get_abbreviation ()
|
For built-in units, this function returns the translated abbreviation of the unit.
NOTE: This string has to be
gimp_unit_get_singular ()
|
For built-in units, this function returns the translated singular form of the unit's name.
NOTE: This string has to be
gimp_unit_get_plural ()
|
For built-in units, this function returns the translated plural form of the unit's name.
NOTE: This string has to be