'\"macro stdmacro
.if n .pH g3x11.XCreGC @(#)XCreGC	40.3 of 1/19/90
.ds tk X Toolkit
.ds xT X Toolkit Intrinsics \- C Language Interface
.ds xI Intrinsics
.ds xW Athena X Widgets \- C Language X Toolkit Interface
.ds xL Xlib \- C Language X Interface
.ds xC Inter-Client Communication Conventions Manual
.ds Rn 3
.ds Vn 2.2
.hw XtMake-Geometry-Request XtQuery-Geometry wid-get
.na
.de Ds
.nf
.\\$1D \\$2 \\$1
.ft 1
.ps \\n(PS
.\".if \\n(VS>=40 .vs \\n(VSu
.\".if \\n(VS<=39 .vs \\n(VSp
..
.de De
.ce 0
.if \\n(BD .DF
.nr BD 0
.in \\n(OIu
.if \\n(TM .ls 2
.sp \\n(DDu
.fi
..
.de FD
.LP
.KS
.TA .5i 3i
.ta .5i 3i
.nf
..
.de FN
.fi
.KE
.LP
..
.de IN		\" send an index entry to the stderr
.tm \\n%:\\$1:\\$2:\\$3
..
.de C{
.KS
.nf
.D
.\"
.\"	choose appropriate monospace font
.\"	the imagen conditional, 480,
.\"	may be changed to L if LB is too
.\"	heavy for your eyes...
.\"
.ie "\\*(.T"480" .ft L
.el .ie "\\*(.T"300" .ft L
.el .ie "\\*(.T"202" .ft PO
.el .ie "\\*(.T"aps" .ft CW
.el .ft R
.ps \\n(PS
.ie \\n(VS>40 .vs \\n(VSu
.el .vs \\n(VSp
..
.de C}
.DE
.R
..
.de Pn
.ie t \\$1\fB\^\\$2\^\fR\\$3
.el \\$1\fI\^\\$2\^\fP\\$3
..
.de PN
.ie t \fB\^\\$1\^\fR\\$2
.el \fI\^\\$1\^\fP\\$2
..
.de NT
.ne 7
.ds NO Note
.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
.ie n .sp
.el .sp 10p
.TB
.ce
\\*(NO
.ie n .sp
.el .sp 5p
.if '\\$1'C' .ce 99
.if '\\$2'C' .ce 99
.in +5n
.ll -5n
.R
..
.		\" Note End -- doug kraft 3/85
.de NE
.ce 0
.in -5n
.ll +5n
.ie n .sp
.el .sp 10p
..
.ny0
.nr X
.if \nX=0 .ds x} XCreateGC 3X11 "9/1/88" "XWIN 3.0" "\&"
.if \nX=1 .ds x} XCreateGC 3X11 "9/1/88" "XWIN 3.0"
.if \nX=2 .ds x} XCreateGC 3X11 "" "\&"
.if \nX=3 .ds x} XCreateGC "" "" "\&"
.TH \*(x}
.SH NAME
XCreateGC, XCopyGC, XChangeGC, XFreeGC, XGContextFromGC
\- create or free graphics contexts
.SH SYNTAX
.\" $Header: XCreateGC.f,v 1.2 88/05/09 11:06:37 mento Exp $
GC XCreateGC\^(\^\fIdisplay\fP, \fId\fP\^, \fIvaluemask\fP\^, \fIvalues\fP\^)
.br
      Display *\fIdisplay\fP\^;
.br
      Drawable \fId\fP\^;
.br
      unsigned long \fIvaluemask\fP\^;
.br
      XGCValues *\^\fIvalues\fP\^;
.LP
.\" $Header: XCopyGC.f,v 1.2 88/05/09 11:08:57 mento Exp $
XCopyGC\^(\^\fIdisplay\fP, \fIsrc\fP\^, \fIvaluemask\fP\^, \fIdest\fP\^)
.br
      Display *\fIdisplay\fP\^;
.br
      GC \fIsrc\fP\^, \fIdest\fP\^;
.br
      unsigned long \fIvaluemask\fP\^;
.LP
.\" $Header: XChGC.f,v 1.2 88/05/09 11:19:10 mento Exp $
XChangeGC\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIvaluemask\fP\^, \fIvalues\fP\^)
.br
      Display *\fIdisplay\fP\^;
.br
      GC \fIgc\fP\^;
.br
      unsigned long \fIvaluemask\fP\^;
.br
      XGCValues *\^\fIvalues\fP\^;
.LP
.\" $Header: XFreeGC.f,v 1.1 88/02/26 10:00:18 mento Exp $
XFreeGC\^(\^\fIdisplay\fP, \fIgc\fP\^)
.br
      Display *\fIdisplay\fP\^;
.br
      GC \fIgc\fP\^;
.LP
GContext XGContextFromGC\^(\^\fIgc\fP\^)
.br
      GC \fIgc\fP\^;
.SH ARGUMENTS
.\" $Header: d.a,v 1.1 88/02/26 10:04:25 mento Exp $
.IP \fId\fP 1i
Specifies the drawable. 
.\" $Header: dest.a,v 1.2 88/05/09 11:11:56 mento Exp $
.IP \fIdest\fP 1i
Specifies the destination GC.
.\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
.IP \fIdisplay\fP 1i
Specifies the connection to the X\s-2WIN\s+2 server.
.\" $Header: gc.a,v 1.2 88/05/09 11:20:34 mento Exp $
.IP \fIgc\fP 1i
Specifies the GC.
.\" $Header: src.a,v 1.2 88/05/09 11:11:06 mento Exp $
.IP \fIsrc\fP 1i
Specifies the components of the source GC.
.ds Vm set, copied, or changed 
.\" $Header: valuemask1.a,v 1.6 88/08/04 11:20:52 mento Exp $
.IP \fIvaluemask\fP 1i
Specifies which components in the GC are to be \*(Vm. 
This argument is the bitwise inclusive OR of one or more of the valid
GC component mask bits.
.\" $Header: values1.a,v 1.2 88/05/09 10:50:42 mento Exp $
.IP \fIvalues\fP 1i
Specifies any values as specified by the valuemask.
.SH DESCRIPTION
.\" $Header: XCreateGC.d,v 1.2 88/06/11 07:49:40 mento Exp $
The
.PN XCreateGC
function creates a graphics context and returns a GC.
The GC can be used with any destination drawable having the same root
and depth as the specified drawable.
Use with other drawables results in a
.PN BadMatch
error.
.LP
.ds fd .PN XCreateGC
\*(fd
can generate
.PN BadAlloc ,
.PN BadDrawable ,
.PN BadFont ,
.PN BadMatch ,
.PN BadPixmap ,
and
.PN BadValue 
errors.
.LP
.\" $Header: XCopyGC.d,v 1.3 88/06/11 07:49:27 mento Exp $
The
.PN 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
.PN BadMatch
error results.
The valuemask specifies which component to copy, as for
.PN XCreateGC .
.LP
.ds fd .PN XCopyGC
\*(fd
can generate
.PN BadAlloc ,
.PN BadGC ,
and
.PN BadMatch
errors.
.LP
.\" $Header: XChGC.d,v 1.3 88/06/11 07:49:02 mento Exp $
The
.PN XChangeGC
function changes the components specified by valuemask for
the specified GC.
The values argument contains the values to be set.
The values and restrictions are the same as for 
.PN XCreateGC .
Changing the clip-mask overrides any previous 
.PN XSetClipRectangles
request on the context. 
Changing the dash-offset or dash-list
overrides any previous 
.PN XSetDashes
request on the context.
The order in which components are verified and altered is server-dependent.
If an error is generated, a subset of the components may have been altered.
.LP
.ds fd .PN XChangeGC
\*(fd
can generate
.PN BadAlloc ,
.PN BadFont ,
.PN BadGC ,
.PN BadMatch ,
.PN BadPixmap ,
and
.PN BadValue 
errors.
.LP
.\" $Header: XFreeGC.d,v 1.3 88/06/11 07:50:48 mento Exp $
The
.PN XFreeGC
function destroys the specified GC as well as all the associated storage.
.LP
.ds fd .PN XFreeGC
.LP
\*(fd 
can generate a
.PN BadGC 
error.
.SH DIAGNOSTICS
.\" $Header: badalloc.e,v 1.3 87/09/11 11:17:14 mento Exp $
.TP 1i
.PN BadAlloc
The server failed to allocate the requested resource or server memory.
.\" $Header: baddrawable.e,v 1.1 87/09/04 08:22:59 mento Exp $
.TP 1i
.PN BadDrawable
A value for a Drawable argument does not name a defined Window or Pixmap.
.\" $Header: badfont.e,v 1.2 87/09/09 18:08:11 mento Exp $
.TP 1i
.PN BadFont
A value for a Font or GContext argument does not name a defined Font.
.\" $Header: badgc.e,v 1.1 87/09/04 08:23:02 mento Locked $
.TP 1i
.PN BadGC
A value for a GContext argument does not name a defined GContext.
.\" $Header: badmatch1.e,v 1.3 87/09/09 18:18:54 mento Exp $
.TP 1i
.PN BadMatch
An
.PN InputOnly
window is used as a Drawable.
.\" $Header: badmatch2.e,v 1.3 87/09/11 11:53:42 mento Exp $
.TP 1i
.PN 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.
.\" $Header: badpixmap.e,v 1.1 87/09/04 08:23:16 mento Exp $
.TP 1i
.PN BadPixmap
A value for a Pixmap argument does not name a defined Pixmap.
.\" $Header: badvalue.e,v 1.1 87/09/04 08:23:19 mento Exp $
.TP 1i
.PN 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.
.SH "SEE ALSO"
XQueryBestSize(3X11),
.br
XSetArcMode(3X11),
.br
XSetClipOrigin(3X11),
.br
XSetFillStyle(3X11),
.br
XSetFont(3X11),
.br
XSetLineAttributes(3X11),
.br
XSetState(3X11),
.br
XSetTile(3X11)
.br
\fI\*(xL\fP
