XCopyArea(3)
π NAME π
XCopyArea(3) bestie!! This is the manual page for XCopyArea, XCopyPlane β copy areas. Two functions, one iconic little page, zero cap. π
β¨ SYNTAX β¨
Okay so the signatures, verbatim, because we do not mess with code:
int XCopyArea(Display *display, Drawable src, Drawable dest, GC gc, int
src_x, int src_y, unsigned int width, unsigned height, int
dest_x, int dest_y);
int XCopyPlane(Display *display, Drawable src, Drawable dest, GC gc, int
src_x, int src_y, unsigned width, unsigned height, int dest_x,
int dest_y, unsigned long plane);
πΈ ARGUMENTS πΈ
dest_x,dest_yβ specify the x and y coordinates, which are relative to the origin of the destination rectangle and specify its upper-left corner. π―displayβ specifies the connection to the X server. πgcβ specifies the GC. π¨planeβ specifies the bit plane. You must set exactly one bit to1. π¨src,destβ specify the source and destination rectangles to be combined. π«Άsrc_x,src_yβ specify the x and y coordinates, which are relative to the origin of the source rectangle and specify its upper-left corner. πwidth,heightβ specify the width and height, which are the dimensions of both the source and destination rectangles. π
π DESCRIPTION π
XCopyArea combines the specified rectangle of src with the specified rectangle of dest. The drawables must have the same root and depth, or a BadMatch error results. No exceptions, bestie. π€
If regions of the source rectangle are obscured and have not been retained in backing store, or if regions outside the boundaries of the source drawable are specified, those regions are not copied. Instead, the following happens on all corresponding destination regions that are either visible or are retained in backing store. π
- If the destination is a window with a background other than
None, corresponding regions of the destination are tiled with that background (with plane-mask of all ones andGXcopyfunction). π¨ - Regardless of tiling or whether the destination is a window or a pixmap, if
graphics-exposuresisTrue, thenGraphicsExposeevents for all corresponding destination regions are generated. β¨ - If
graphics-exposuresisTruebut noGraphicsExposeevents are generated, aNoExposeevent is generated. π«’ - Note that by default
graphics-exposuresisTruein new GCs. π
This function uses these GC components: function, plane-mask, subwindow-mode, graphics-exposures, clip-x-origin, clip-y-origin, and clip-mask. π§°
XCopyArea can generate BadDrawable, BadGC, and BadMatch errors. π
XCopyPlane uses a single bit plane of the specified source rectangle combined with the specified GC to modify the specified rectangle of dest. The drawables must have the same root but need not have the same depth. If the drawables do not have the same root, a BadMatch error results. If plane does not have exactly one bit set to 1 and the value of plane is not less than %2 sup n%, where n is the depth of src, a BadValue error results. π¨
Effectively, XCopyPlane forms a pixmap of the same depth as the rectangle of dest and with a size specified by the source region. It uses the foreground/background pixels in the GC (foreground everywhere the bit plane in src contains a bit set to 1, background everywhere the bit plane in src contains a bit set to 0) and the equivalent of a CopyArea protocol request is performed with all the same exposure semantics. This can also be thought of as using the specified region of the source bit plane as a stipple with a fill-style of FillOpaqueStippled for filling a rectangular area of the destination. π§
This function uses these GC components: function, plane-mask, foreground, background, subwindow-mode, graphics-exposures, clip-x-origin, clip-y-origin, and clip-mask. π§°
XCopyPlane can generate BadDrawable, BadGC, BadMatch, and BadValue errors. π
π©Ί DIAGNOSTICS π©Ί
BadDrawableβ A value for aDrawableargument does not name a definedWindoworPixmap. πBadGCβ A value for aGContextargument does not name a definedGContext. π«BadMatchβ AnInputOnlywindow is used as aDrawable. πBadMatchβ Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. π§©BadValueβ Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified 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. π¨
π SEE ALSO π
XClearArea(3)Xlib - C Language X Interface
π«Ά Okay thatβs the whole page, bestie. Footer check: source/version is X Version 11, libX11 1.8.14 β and the original footer has no separate date line, so Iβm not inventing one. β¨π
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms