XCopyGC

Syntax

XCopyGC(display, src, valuemask, dest)
      Display *display;
      GC src, dest;
      unsigned long valuemask;

Arguments

display Specifies the connection to the X server.
src Specifies the components of the source GC.
valuemask Specifies which components in the GC are to be copied to the destination GC. This argument is the bitwise inclusive OR of zero or more of the valid GC component mask bits.
dest Specifies the destination GC.

Description

The XCopyGC() function copies the specified components from the source GC to the destination GC. The source and destination GCs must have the same root and depth, or a BadMatch error results. The valuemask specifies which component to copy, as for XCreateGC().

XCopyGC() can generate BadAlloc, BadGC, and BadMatch errors.

Diagnostics

BadAlloc The server failed to allocate the requested source or server memory.
BadGC A value for a GContext argument does not name a defined GContext.
BadMatch An InputOnly window is used as a Drawable.
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.

See also

AllPlanes(), XChangeGC(), XCopyArea(), XCreateGC(), XCreateRegion(), XDrawArc(), XDrawLine(), XDrawRectangle(), XDrawText(), XFillRectangle(), XFreeGC(), XGContextFromGC(), XGetGCValues(), XQueryBestSize(), XSetArcMode(), XSetClipOrigin(), "Manipulating Graphics Context/State".
Christophe Tronche, ch@tronche.com