Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XCreGC(3X) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XQueryBestSize(3X)

XSetArcMode(3X)

XSetClipOrigin(3X)

XSetFillStyle(3X)

XSetFont(3X)

XSetLineAttributes(3X)

XSetState(3X)

XSetTile(3X)

XCreateGC(3X)  —  X Version 11

NAME

XCreateGC, XCopyGC, XChangeGC, XFreeGC − create and free graphics contexts

SYNTAX

GC XCreateGC(display, d, valuemask_create, values)
      Display ∗display;
      Drawable d;
      unsigned long valuemask_create;
      XGCValues ∗values;

XCopyGC(display, src, valuemask_copy, dest)
      Display ∗display;
      GC src, dest;
      unsigned long valuemask_copy;

XChangeGC(display, gc, valuemask_change, values)
      Display ∗display;
      GC gc;
      unsigned long valuemask_change;
      XGCValues ∗values;

XFreeGC(display, gc)
      Display ∗display;
      GC gc;

ARGUMENTS

dSpecifies the drawable. 

destSpecifies the destination graphics context. 

displaySpecifies the connection to the X server. 

gcSpecifies the graphics context. 

srcSpecifies the components of the source graphics context. 

valuemask_change
Specifies which components in the graphics context are to be changed using information in the XGCValues structure. This argument is the bitwise inclusive OR of one or more of the valid GC component masks.

valuemask_copy
Specifies which components in the source graphics context are to be copied to the destination graphics context. This argument is the bitwise inclusive OR of one or more of the valid GC component masks.

valuemask_create
Specifies which components in the graphics context are to be set using information in the XGCValues structure. This argument is the bitwise inclusive OR of one or more of the valid GC component masks.

valuesSpecifies a pointer to the XGCValues structure.

DESCRIPTION

The XCreateGC function creates a graphics context and returns a GC. .PN XCreateGC can generate BadAlloc, BadDrawable, BadFont, BadMatch, BadPixmap, and BadValue errors.

The XCopyGC function copies the specified components from the source graphics context to the destination graphics context. .PN XCopyGC can generate BadAlloc, BadGC, BadMatch, and BadValue errors.

The XChangeGC function changes the components specified by the valuemask_change argument for the specified graphics context. .PN XChangeGC can generate BadAlloc, BadFont, BadGC, BadMatch, BadPixmap, and BadValue errors.

The XFreeGC function destroys the specified graphics context as well as the shadow copy.

.PN 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. 

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 generate this error. 

SEE ALSO

XQueryBestSize(3X), XSetArcMode(3X), XSetClipOrigin(3X), XSetFillStyle(3X), XSetFont(3X), XSetLineAttributes(3X), XSetState(3X), XSetTile(3X)
Xlib − C Language X Interface

1 March 1988

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