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

# XPolygonRegion(3)

generate regions

## NAME

XPolygonRegion, XClipBox - generate regions

## SYNTAX

Region XPolygonRegion(XPoint *points*\[\], int *n*, int *fill\_rule*);

int XClipBox(Region *r*, XRectangle \**rect\_return*);

## ARGUMENTS

- *fill\_rule*

  Specifies the fill-rule you want to set for the specified GC. You can pass **EvenOddRule** or **WindingRule**.

- *n*

  Specifies the number of points in the polygon.

- *points*

  Specifies an array of points.

- *r*

  Specifies the region.

- *rect\_return*

  Returns the smallest enclosing rectangle.

## DESCRIPTION

The **XPolygonRegion** function returns a region for the polygon defined by the points array. For an explanation of fill\_rule, see **XCreateGC**.

The **XClipBox** function returns the smallest rectangle enclosing the specified region.

## SEE ALSO

[**XCreateGC**(3)](/XCreateGC/3.md), [**XDrawPoint**(3)](/XDrawPoint/3.md), [**XDrawRectangle**(3)](/XDrawRectangle/3.md)\
 *Xlib - C Language X Interface*
