### Method

# Vips Image draw_flood

#### Declaration [src]

    int
    vips_draw_flood (
      VipsImage* image,
      double* ink,
      int n,
      int x,
      int y,
      ...
    )

#### Description [src]

Flood-fill `image` with `ink`, starting at position `x`, `y`.

The filled area is bounded by pixels that are equal to the ink colour, in other words, it searches for pixels enclosed by an edge of `ink`.

If `equal` is set, it instead searches for pixels which are equal to the start point and fills them with `ink`.

Normally it will test and set pixels in `image`. If `test` is set, it will test pixels in `test` and set pixels in `image`. This lets you search an image (`test`) for continuous areas of pixels without modifying it.

`left`, `top`, `width`, `height` output the bounding box of the modified pixels.

Optional arguments

- `test`: `VipsImage`, test this image
- `equal`: `gboolean`, fill while equal to edge
- `left`: `gint`, output left edge of bounding box of modified area
- `top`: `gint`, output top edge of bounding box of modified area
- `width`: `gint`, output width of bounding box of modified area
- `height`: `gint`, output height of bounding box of modified area

`ink` is an array of double containing values to draw.

See also

`vips_draw_flood1()`.

This method is not directly available to language bindings.

#### Parameters

`ink`

  Type: An array of `double`

  Value to draw.

  The length of the array is specified in the `n` argument.
  The data is owned by the caller of the method.

`n`

  Type: `int`

  Length of ink array.

`x`

  Type: `int`

  Centre of circle.

`y`

  Type: `int`

  Centre of circle.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, or -1 on error.