GimpUi.SizeEntry.set_resolution

@accepts(GimpUi.SizeEntry, int, float, bool)
@returns(none)
def set_resolution(self, field, resolution, keep_size):
    # Python wrapper for gimp_size_entry_set_resolution()
  

Sets the resolution (in dpi) for field # field of the GimpUi.SizeEntry.

The resolution passed will be clamped to fit in [#GIMP_MIN_RESOLUTION..#GIMP_MAX_RESOLUTION].

This function does nothing if the GimpUi.SizeEntryUpdatePolicy specified in GimpUi.SizeEntry.new doesn't equal to #GIMP_SIZE_ENTRY_UPDATE_SIZE.

self

The sizeentry you want to set a resolution for.

field

The index of the field you want to set the resolution for.

resolution

The new resolution (in dpi) for the chosen field.

keep_size

True if the field's size in pixels should stay the same. False if the field's size in units should stay the same.