Class
GimpUnit
Description [src]
final class Gimp.Unit : GObject.TypeInstance {
/* No available fields */
}
Provides a collection of predefined units and functions for creating user-defined units.
Functions
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).
Instance methods
gimp_unit_get_abbreviation
For built-in units, this function returns the translated abbreviation of the unit.
gimp_unit_get_digits
Returns the number of digits set for unit
.
Built-in units’ accuracy is approximately the same as an inch with
two digits. User-defined units can suggest a different accuracy.
gimp_unit_get_plural
For built-in units, this function returns the translated plural form of the unit’s name.
gimp_unit_get_scaled_digits
Returns the number of digits a unit
field should provide to get
enough accuracy so that every pixel position shows a different
value from neighboring pixels.
gimp_unit_get_singular
For built-in units, this function returns the translated singular form of the unit’s name.
gimp_unit_is_metric
Checks if the given unit
is metric. A simplistic test is used
that looks at the unit’s factor and checks if it is 2.54 multiplied
by some common powers of 10. Currently it checks for mm, cm, dm, m.
since: 2.10
gimp_unit_set_deletion_flag
Sets a GimpUnit
‘s deletion_flag
. If the deletion_flag
of a unit is
TRUE
when GIMP exits, this unit will not be saved in the users’s
“unitrc” file.