Previous: , Up: Graphics Contexts   [Contents][Index]

6.5 Graphics Context Cache

CLX provides a set of functions to control the automatic graphics context caching mechanism.

Function: force-gcontext-changes gcontext

A gcontext.

Forces any delayed changes to the specified graphics context to be sent out to the server. Note that force-gcontext-changes is called by all of the graphics functions.

Macro: with-gcontext gcontext &key :arc-mode :background :cap-style :clip-mask :clip-ordering :clip-x :clip-y :dashes :dash-offset :exposures :fill-rule :fill-style :font :foreground :function :join-style :line-style :line-width :plane-mask :stipple :subwindow-mode :tile :ts-x :ts-y &allow-other-keys &body body

Changes the indicated graphics context components to the specified values only within the dynamic extent of the body. with-gcontext works on a per-process basis in a multiprocessing environment. The body is not surrounded by a with-display form. If there is no local cache for the specified graphics context, or if some of the component states are unknown, with-gcontext does the save and restore by creating a temporary graphics context and copying components to and from it using copy-gcontext-components.


A gcontext.


These keyword arguments and associated values specify which graphics context components are to be changed. Any components not specified are left unmodified. See Creating Graphics Contexts, for more information.


The body of code which will have access to the altered graphics context.