# Gimp.Unit.new

    function new(identifier: String, factor: Number(gdouble), digits: Number(gint), symbol: String, abbreviation: String, singular: String, plural: String): Gimp.Unit {
        // Gjs wrapper for gimp_unit_new()
    }

Returns the integer ID of the new Gimp.Unit.

Note that a new unit is always created with its deletion flag set to true. You will have to set it to false with Gimp.Unit.prototype.set_deletion_flag to make the unit definition persistent.

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.prototype.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.