XPolygonRegion(), XClipBox() - generate regions
Region XPolygonRegion (XPoint points[], int n, int fill_rule)
XClipBox (Region r, XRectangle *rect_return)
The XPolygonRegion(3) function returns a region for the polygon defined by the points array. For an explanation of fill_rule, see XCreateGC(3).
The XClipBox(3) function returns the smallest rectangle enclosing the specified region.
Xlib