Gimp.Unit.prototype.get_scaled_digits

function get_scaled_digits(resolution: Number(gdouble)): Number(gint) {
    // Gjs wrapper for 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.

Note: when needing digit accuracy to display a diagonal distance, the resolution may not correspond to the image's horizontal or vertical resolution, but instead to the result of: `distance_in_pixel / distance_in_inch`.

resolution

the resolution in PPI.

Returns

The suggested number of digits.