Gegl.Buffer.sample

### Method

# Gegl Buffersample

#### Declaration [src]

    void
    gegl_buffer_sample (
      GeglBuffer* buffer,
      gdouble x,
      gdouble y,
      GeglBufferMatrix2* scale,
      gpointer dest,
      const Babl* format,
      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()` 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.

`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).