The graphics-state object associated with each port holds values for parameters such as foreground , background , operation , thickness , scale-thickness , mask and font which affect graphics ports drawing to that port.
The full set of parameters is described under graphics-state.
The graphics state values associated with a drawing function call are set by one of three mechanisms.
(draw-line port 1 1 100 100
:thickness 10
:scale-thickness nil
:foreground :red)
(with-graphics-state (port :thickness 10
:scale-thickness nil
:foreground :red)
(draw-line port 1 1 100 100)
(draw-rectangle port 2 2 40 50 :filled t))
For common cases of locally changing the transform in the graphics state, there are specific macros:
:transform
.(set-graphics-state port :thickness 10
:scale-thickness nil
:foreground :red)
The first two mechanisms change the graphics state temporarily. The last one changes it permanently in port , effectively altering the "default" state.
CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017