Macro
with-graphics-state (port &rest args
&key transform foreground background
operation thickness
scale-thickness dashed dash
line-end-style line-joint-style
mask font state
fill-style stipple pattern mask-x
mask-y) body => result
A graphics port
A body of Lisp code
The return value of the last form executed in body
with-graphics-state macro binds the graphics state values for the specified port to the values specified in the args list. The keywords args are the same as the symbols of the slots in the graphics state, as described above. For example:
(with-graphics-state (port :thickness 12
:foreground fore-color) ...)
:state can be used. The value must be a graphics state object created by a call tomake-graphics-state. The contents of the graphics state object passed are used instead of the port's state. (setf gstate (make-graphics-state)) (setf (graphics-state-foreground gstate) my-color) (with-graphics-state (port :state gstate) (draw-rectangle port image-1 100 100))