### Method

# Vips Image draw_mask

#### Declaration [src]

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

#### Description [src]

Draw `mask` on the image. `mask` is a monochrome 8-bit image with 0/255 for transparent or `ink` coloured points. Intermediate values blend the ink with the pixel. Use with `vips_text()` to draw text on an image. Use in a `vips_draw_line()` subclass to draw an object along a line.

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

See also

`vips_text()`, `vips_draw_line()`.

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`

  Size of ink array.

`mask`

  Type: `VipsImage`

  Mask of 0/255 values showing where to plot.

  The data is owned by the caller of the method.

`x`

  Type: `int`

  Draw mask here.

`y`

  Type: `int`

  Draw mask here.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, or -1 on error.