### Function

# Gimp context_set_distance_metric

#### Declaration [src]

    gboolean
    gimp_context_set_distance_metric (
      GeglDistanceMetric metric
    )

#### Description [src]

Set the distance metric used in some computations.

This procedure 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().

Available since: | 2.10

#### Parameters

`metric` | `GeglDistanceMetric`
| The distance metric.

#### Return value

Returns: | `gboolean`
| TRUE on success.