IT lexicon › Infra & Ops › Graphics context (X11)

Graphics context (X11)

Infra & Ops På svenska → Updated: 2026-10-07

A bundle of drawing settings kept on the server, so that every line doesn't have to ship its own colour across the network.

X11 was designed for programs and displays on different machines, and every byte on the wire counted. So drawing attributes — foreground and background colour, line width, dash pattern, font, clip mask and raster function — live in a server-side object, the GC, created with XCreateGC. A request to draw a line then carries only the GC's id and the coordinates.

The GXxor raster function was a classic: draw a rectangle with XOR, draw it again in the same place and it vanishes. Rubber-band selections and window outlines during a move worked that way for decades. Modern toolkits render with Cairo or Skia instead and push finished images through XRender, leaving the GC as little more than a copy setting.

← Back to the lexicon