To create a graphics context, use create-gcontext.
|create-gcontext||&key :arc-mode :background (:cache-p t) :cap-style :clip-mask :clip-ordering :clip-x :clip-y :dash-offset :dashes :drawable :exposures :fill-rule :fill-style :font :foreground :function :join-style :line-style :line-width :plane-mask :stipple :subwindow-mode :tile :ts-x :ts-y||Function|
Creates, initializes, and returns a graphics context (gcontext). The graphics context can only be used with destination drawables having the same root and depth as the specified :drawable. If :cache-p is non-nil, the graphics context state is cached locally, and changing a component has no effect unless the new value differs from the cached value. Changes to a graphics context (setf and with-gcontext) are always deferred regardless of the cache mode and sent to the server only when required by a local operation or by an explicit call to force-gcontext-changes.
All of the graphics context components are set to the values that are specified by the keyword arguments, except that a value of nil causes the default value to be used. These default values are as follows:
Note that foreground and background do not default to any values that are likely to be useful on a color display. Since specifying a nil value means use the default, this implies for clip-mask that an empty rectangle sequence cannot be specified as an empty list; :none must be used instead. Specifying a stringable for font causes an implicit open-font call to occur.