Gegl.BufferIterator.add

### Method

# Gegl BufferIterator add

#### Declaration [src]

    gint
    gegl_buffer_iterator_add (
      GeglBufferIterator* iterator,
      GeglBuffer* buffer,
      const GeglRectangle* roi,
      gint level,
      const Babl* format,
      GeglAccessMode access_mode,
      GeglAbyssPolicy abyss_policy
    )

#### Description [src]

Adds an additional buffer iterator that will be processed in sync with the original one, if the buffer doesn’t align with the other for tile access the corresponding scans and regions will be serialized automatically using gegl_buffer_get.

If the buffer shares its tiles with a previously-added buffer (in particular, if the same buffer is added more than once), and at least one of the buffers is accessed for writing, the corresponding iterated-over areas should either completely overlap, or not overlap at all, in the coordinate- system of the underlying tile storage (that is, after shifting each area by the corresponding buffer’s shift-x and shift-y properties). If the areas overlap, at most one of the buffers may be accessed for writing, and the data pointers of the corresponding iterator items may refer to the same data.

This method is not directly available to language bindings.

#### Parameters

`buffer`

  Type: `GeglBuffer`

  A `GeglBuffer`.

  The data is owned by the caller of the method.

`roi`

  Type: `GeglRectangle`

  The rectangle to iterate over.

  The data is owned by the caller of the method.

`level`

  Type: `gint`

  The level at which we are iterating, the roi will indicate the extent at 1:1, x,y,width and height are/(2^level).

`format`

  Type: `Babl`

  The format we want to process this buffers data in, pass 0 to use the buffers format.

  The data is owned by the caller of the method.

`access_mode`

  Type: `GeglAccessMode`

  Whether we need reading or writing to this buffer.

`abyss_policy`

  Type: `GeglAbyssPolicy`

  How request outside the buffer extent are handled.

#### Return value

Type: `gint`

An integer handle refering to the indice in the iterator structure of the added buffer.