NAME
XSetRegion — set clip_mask of the graphics context to the specified region.
SYNOPSIS
XSetRegion(display, gc, r) Display ∗display; GC gc; Region r;
ARGUMENTS
displaySpecifies a connection to an X server; returned from XOpenDisplay().
gcSpecifies the graphics context.
rSpecifies the region.
DESCRIPTION
XSetRegion() sets the clip_mask component of a GC to the specified region. Thereafter, all drawing made with gc will be confined to the area of intersection of the region and the drawable. Once it is set in the GC, the region can be destroyed.
Regions are located using an offset from a point (the region origin) which is common to all regions. It is up to the application to interpret the location of the region relative to a drawable. When the region is to be used as a clip_mask by calling XSetRegion(), the upper-left corner of region relative to the drawable used in the graphics request will be at (xoffset + clip_x_origin, yoffset + clip_y_origin), where xoffset and yoffset are the offset of the region and clip_x_origin and clip_y_origin are elements of the GC used in the graphics request.
For more information on regions, see Volume One, Chapter 5, The Graphics Context, and Chapter 6, Drawing Graphics and Text.
STRUCTURES
Region is a pointer to an opaque structure type.
SEE ALSO
XClipBox(), XCreateRegion(), XDestroyRegion(), XEmptyRegion(), XEqualRegion(), XIntersectRegion(), XOffsetRegion(), XPointInRegion(), XPolygonRegion(), XRectInRegion(), XShrinkRegion(), XSubtractRegion(), XUnionRectWithRegion(), XUnionRegion(), XXorRegion().
Xlib Reference Manual