### Method

# Vips Image draw_rect

#### Declaration [src]

    int
    vips_draw_rect (
      VipsImage* image,
      double* ink,
      int n,
      int left,
      int top,
      int width,
      int height,
      ...
    )

#### Description [src]

Paint pixels within `left`, `top`, `width`, `height` in `image` with `ink`.

If `fill` is zero, just paint a 1-pixel-wide outline.

Optional arguments

- `fill`: `gboolean`, fill the rect

See also

`vips_draw_circle()`.

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.

`left`

  Type: `int`

  Area to paint.

`top`

  Type: `int`

  Area to paint.

`width`

  Type: `int`

  Area to paint.

`height`

  Type: `int`

  Area to paint.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, or -1 on error.