Gimp.context_set_distance_metric

function context_set_distance_metric(metric: Gegl.DistanceMetric): Boolean {
    // Gjs wrapper for gimp_context_set_distance_metric()
}
  

Set the distance metric used in some computations.

Modifies the distance metric used in some computations, such as Gimp.Drawable.prototype.edit_gradient_fill. In particular, it does not change the metric used in generic distance computation on canvas, as in the Measure tool.

This setting affects the following procedures: Gimp.Drawable.prototype.edit_gradient_fill.

Since 2.10

metric

The distance metric.

Returns

TRUE on success.