(defclass boring-gradient (design) ()) (defmethod draw-design (medium (design boring-gradient) &rest drawing-options) (apply #'invoke-with-drawing-options medium (lambda (medium) (loop for x from 0 below 400 by 1 do (draw-line* medium 0 x 1000 x :ink (make-rgb-color (/ (- 400 x) 400) 0 (/ x 400))))) drawing-options)) (defun foo () (draw-rectangle* *standard-output* 0 0 400 400 :ink (make-instance 'boring-gradient) :clipping-region (region-difference (clim:make-ellipse* 200 200 100 0 0 100) (clim:make-ellipse* 200 200 50 0 0 50))))