XCreateGC(3X11) XCreateGC(3X11)
NAME
XCreateGC, XCopyGC, XChangeGC, XFreeGC, XGContextFromGC -
create or free graphics contexts
SYNTAX
GC XCreateGC(display, d, valuemask, values)
Display *display;
Drawable d;
unsigned long valuemask;
XGCValues *values;
XCopyGC(display, src, valuemask, dest)
Display *display;
GC src, dest;
unsigned long valuemask;
XChangeGC(display, gc, valuemask, values)
Display *display;
GC gc;
unsigned long valuemask;
XGCValues *values;
XFreeGC(display, gc)
Display *display;
GC gc;
GContext XGContextFromGC(gc)
GC gc;
ARGUMENTS
d Specifies the drawable.
dest Specifies the destination GC.
display Specifies the connection to the XWIN server.
gc Specifies the GC.
src Specifies the components of the source GC.
valuemask Specifies which components in the GC are to be
set, copied, or changed . This argument is the
bitwise inclusive OR of one or more of the valid
GC component mask bits.
values Specifies any values as specified by the
valuemask.
DESCRIPTION
The XCreateGC function creates a graphics context and
returns a GC. The GC can be used with any destination draw-
able having the same root and depth as the specified
XWIN 3.0 Last change: 9/1/88 .ie t
XCreateGC(3X11) XCreateGC(3X11)
drawable. Use with other drawables results in a BadMatch
error.
XCreateGC can generate BadAlloc, BadDrawable, BadFont, Bad-
Match, BadPixmap, and BadValue errors.
The XCopyGC function copies the specified components from
the source GC to the destination GC. The source and desti-
nation 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.
The XChangeGC function changes the components specified by
valuemask for the specified GC. The values argument con-
tains the values to be set. The values and restrictions are
the same as for XCreateGC. Changing the clip-mask overrides
any previous XSetClipRectangles request on the context.
Changing the dash-offset or dash-list overrides any previous
XSetDashes request on the context. The order in which com-
ponents are verified and altered is server-dependent. If an
error is generated, a subset of the components may have been
altered.
XChangeGC can generate BadAlloc, BadFont, BadGC, BadMatch,
BadPixmap, and BadValue errors.
The XFreeGC function destroys the specified GC as well as
all the associated storage.
XFreeGC can generate a BadGC error.
DIAGNOSTICS
BadAlloc The server failed to allocate the requested
resource or server memory.
BadDrawable
A value for a Drawable argument does not name a
defined Window or Pixmap.
BadFont A value for a Font or GContext argument does not
name a defined Font.
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.
XWIN 3.0 Last change: 9/1/88 .ie t
XCreateGC(3X11) XCreateGC(3X11)
BadPixmap A value for a Pixmap argument does not name a
defined Pixmap.
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 gen-
erate this error.
SEE ALSO
XQueryBestSize(3X11),
XSetArcMode(3X11),
XSetClipOrigin(3X11),
XSetFillStyle(3X11),
XSetFont(3X11),
XSetLineAttributes(3X11),
XSetState(3X11),
XSetTile(3X11)
Xlib - C Language X Interface
XWIN 3.0 Last change: 9/1/88 .ie t
XCreateGC(3X11) XCreateGC(3X11)
XWIN 3.0 Last change: 9/1/88 .ie t