Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSetClipMask(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XCreateGC(3X)

XDrawRectangle(3X)

XQueryBestSize(3X)

XSetArcMode(3X)

XSetFillStyle(3X)

XSetFont(3X)

XSetLineAttributes(3X)

XSetState(3X)

XSetTile(3X)




XSetClipOrigin(3X) XSetClipOrigin(3X)
NAME XSetClipOrigin, XSetClipMask, XSetClipRectangles - set the clip origin and the clip mask in the graphic context SYNOPSIS XSetClipOrigin (display, gc, clip-x-origin, clip-y-origin) Display *display; GC gc; int clip-x-origin, clip-y-origin; XSetClipMask (display, gc, pixmap) Display *display; GC gc; Pixmap pixmap; XSetClipRectangles (display, gc, clip-x-origin, clip-y-origin, rectangles, n, ordering) Display *display; GC gc; int clip-x-origin,clip-y-origin; XRectangle rectangles[]; int n; int ordering; DESCRIPTION The XSetClipOrigin function sets the clip origin in the specified graphic context. The clip mask origin is inter- preted relative to the origin of the destination drawable that is specified in the graphics request. The XSetClipMask function sets the clip mask in the speci- fied graphic context to the specified pixel map. If the clip mask is set to None, the pixels are always drawn, regardless of the clip origin. The XSetClipRectangles function changes the clip mask in the specified graphic context to the specified list of rectan- gles and sets the clip origin. The output is clipped to remain contained within the rectangles. The clip origin is interpreted relative to the origin of the destination draw- able that is specified in a graphics request. The rectangle coordinates are interpreted relative to the clip origin. The rectangles must be nonintersecting, or the graphics results are undefined. Note that the list of rectangles can be emp- ty, which effectively disables output. This is the opposite of passing None as the clip mask in XCreateGC, XChangeGC, and XSetClipMask. If known by the client, ordering relations on the rectangles can be specified with the ordering argument. This may pro- vide faster operation by the server. If an incorrect order- November, 1990 1



XSetClipOrigin(3X) XSetClipOrigin(3X)
ing is specified, the X server may generate a BadMatch er- ror, but it is not required to do so. If no error is gen- erated, the graphics results are undefined. The ordering ar- gument can be any of the following constants: Unsorted The rectangles are in arbitrary order. YSorted The rectangles are nondecreasing in their Y origin. YXSorted Constrains YSorted order in that all rectangles with an equal Y origin are nondecreasing in their X ori- gin. YXBanded Constrains YXSorted by requiring that, for every possible Y scanline, all rectangles that include that scanline have an identical Y origins and Y ex- tents. Arguments These functions accept the following arguments: display Specifies the connection to the X server. clip-x-origin, clip-y-origin Specify the x and y coordinates of the clip origin. gc Specifies the graphic context. n Specifies the number of rectangles. ordering Specifies the ordering relations on the rectangles. Possible values are Unsorted, YSorted, YXSorted, or YXBanded. pixmap Specifies the pixel map or None. rectangles Specifies an array of rectangles that define the clip mask. ERRORS BadAlloc The server failed to allocate the requested resource or server memory. BadGC A value for a GC argument does not name a defined graphic context. 2 November, 1990



XSetClipOrigin(3X) XSetClipOrigin(3X)
BadMatch An argument or pair of arguments has the correct type and range, but fails to match in some other re- quired way. BadValue A numeric value falls outside the range of values accepted by the request. Unless a range is speci- fied for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. The XSetClipOrigin function can generate BadAlloc and BadGC errors. The XSetClipMask and XSetClipRectangles functions can gen- erate BadAlloc, BadGC, BadMatch, and BadValue errors. SEE ALSO XCreateGC(3X), XDrawRectangle(3X), XQueryBestSize(3X), XSetArcMode(3X), XSetFillStyle(3X), XSetFont(3X), XSetLineAttributes(3X), XSetState(3X), XSetTile(3X)
Xlib - C Language Interface
November, 1990 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026