# Gimp.context_set_distance_metric

    @accepts(Gegl.DistanceMetric)
    @returns(bool)
    def context_set_distance_metric(metric):
        # Python 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.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.edit_gradient_fill.

Since 2.10

metric

  The distance metric.

Returns