### Method

# Gegl Buffer sample_at_level

#### Declaration [src]

    void
    gegl_buffer_sample_at_level (
      GeglBuffer* buffer,
      gdouble x,
      gdouble y,
      GeglBufferMatrix2* scale,
      gpointer dest,
      const Babl* format,
      gint level,
      GeglSamplerType sampler_type,
      GeglAbyssPolicy repeat_mode
    )

#### Description [src]

Query interpolate pixel values at a given coordinate using a specified form of interpolation.

If you intend to take multiple samples, consider using `gegl_buffer_sampler_new_at_level()` to create a sampler object instead, which is more efficient.

This method is not directly available to language bindings.

#### Parameters

`x`

  Type: `gdouble`

  X coordinate to sample in buffer coordinates.

`y`

  Type: `gdouble`

  Y coordinate to sample in buffer coordinates.

`scale`

  Type: `GeglBufferMatrix2`

  A matrix that indicates scaling factors, see gegl_sampler_compute_scale the same.

  The data is owned by the caller of the method.

`dest`

  Type: `gpointer`

  Buffer capable of storing one pixel in `format`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`format`

  Type: `Babl`

  The format to store the sampled color in.

  The data is owned by the caller of the method.

`level`

  Type: `gint`

  Mipmap level to sample from (`x` and `y` are level 0 coordinates)

`sampler_type`

  Type: `GeglSamplerType`

  The sampler type to use, to be ported from working code. Valid values: GEGL_SAMPLER_NEAREST, GEGL_SAMPLER_LINEAR, GEGL_SAMPLER_CUBIC, GEGL_SAMPLER_NOHALO and GEGL_SAMPLER_LOHALO.

`repeat_mode`

  Type: `GeglAbyssPolicy`

  How requests outside the buffer extent are handled. Valid values: GEGL_ABYSS_NONE (abyss pixels are zeroed), GEGL_ABYSS_WHITE (abyss pixels are white), GEGL_ABYSS_BLACK (abyss pixels are black), GEGL_ABYSS_CLAMP (coordinates are clamped to the abyss rectangle), GEGL_ABYSS_LOOP (buffer contents are tiled if outside of the abyss rectangle).