---
name: "xcb_poly_fill_rectangle"
section: "3"
platform: "linux"
package: "libxcb"
version: "1.17.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/xcb_poly_fill_rectangle"
---

# xcb\_poly\_fill\_rectangle(3)

Fills rectangles

## NAME

xcb\_poly\_fill\_rectangle - Fills rectangles

## SYNOPSIS

**#include \<xcb/xproto.h\>**

### Request function

xcb\_void\_cookie\_t **xcb\_poly\_fill\_rectangle**(xcb\_connection\_t \**conn*, xcb\_drawable\_t *drawable*, xcb\_gcontext\_t *gc*, uint32\_t *rectangles\_len*, const xcb\_rectangle\_t \**rectangles*);\

## REQUEST ARGUMENTS

- *conn*

  The XCB connection to X11.

- *drawable*

  The drawable (Window or Pixmap) to draw on.

- *gc*

  The graphics context to use.

  The following graphics context components are used: function, plane-mask, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.

  The following graphics context mode-dependent components are used: foreground, background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-origin.

- *rectangles\_len*

  The number of *xcb\_rectangle\_t* structures in *rectangles*.

- *rectangles*

  The rectangles to fill.

## DESCRIPTION

Fills the specified rectangle(s) in the order listed in the array. For any given rectangle, each pixel is not drawn more than once. If rectangles intersect, the intersecting pixels are drawn multiple times.

## RETURN VALUE

Returns an *xcb\_void\_cookie\_t*. Errors (if any) have to be handled in the event loop.

If you want to handle errors directly with *xcb\_request\_check* instead, use *xcb\_poly\_fill\_rectangle\_checked*. See **[xcb-requests(3)](/xcb-requests/3.md)** for details.

## ERRORS

- *xcb\_drawable\_error\_t*

  The specified *drawable* (Window or Pixmap) does not exist.

- *xcb\_g\_context\_error\_t*

  The specified graphics context does not exist.

- *xcb\_match\_error\_t*

  TODO: reasons?

## SEE ALSO

[**xcb-requests**(3)](/xcb-requests/3.md)

## AUTHOR

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
