Class
GimpUnit
Description [src]
final class Gimp.Unit : GObject.Object {
/* No available fields */
}
Provides operations on units, a collection of predefined units and functions to create new units.
Functions
gimp_unit_get_by_id
Returns the unique GimpUnit
object corresponding to unit_id
,
which is the integer identifier as returned by gimp_unit_get_id()
.
since: 3.0
gimp_unit_percent
Returns the unique object representing percent dimensions relatively to an image.
since: 3.0
Instance methods
gimp_unit_get_abbreviation
This function returns the abbreviation of the unit (e.g. “in” for
inches).
It can be used as a short label for the unit in the interface.
For long labels, use gimp_unit_get_name()
.
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_name
This function returns the usual name of the unit (e.g. “inches”).
It can be used as the long label for the unit in the interface.
For short labels, use gimp_unit_get_abbreviation()
.
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_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.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.