Gsk.Path.get_closest_point

### Method

# Gsk Pathget_closest_point

since: 4.14

#### Declaration [src]

    gboolean
    gsk_path_get_closest_point (
      GskPath* self,
      const graphene_point_t* point,
      float threshold,
      GskPathPoint* result,
      float* distance
    )

#### Description [src]

Computes the closest point on the path to the given point and sets the `result` to it.

If there is no point closer than the given threshold, `FALSE` is returned.

Available since: 4.14

#### Parameters

`point`

  Type: `graphene_point_t`

  The point.

  The data is owned by the caller of the method.

`threshold`

  Type: `float`

  Maximum allowed distance.

`result`

  Type: `GskPathPoint`

  Return location for the closest point.

  The argument will be set by the function.
  The data is owned by the instance.

`distance`

  Type: `float*`

  Return location for the distance.

  The argument will be set by the function.
  The argument can be `NULL`.

#### Return value

Type: `gboolean`

`TRUE` if `point` was set to the closest point on `self`, `FALSE` if no point is closer than `threshold`.