anchor.diff:    (set-grid (- grid-size 1) 0 blue)
     grid)
   
  -(setq pressure 0.0 abs-x 0 abs-y 0
  -   tool-size 1 mask nil
  -   grid-size 300 grid (clear-grid grid-size))
  +(defparameter evdev-devices
  +  '((keyboard "/dev/input/event15")
  +    (wacom "/dev/input/event16")
  +    ))
  +
  +(defparameter evdev-device-file
  +  (second (assoc 'wacom evdev-devices :test #'string=)))
  +
  +(setq pressure 0.0
  +      abs-x 0
  +      abs-y 0
  +      tool-size 10
  +      mask nil
  +      grid-size 100
  +      grid (new-grid grid-size))
  +
  +(defun set-device (device-file)
  +  "configure the input device file location"
  +  (setq evdev-device-file device-file))
   
   (defun handle-pen (event)
  +  "pen event handler for events like ABS_PRESSURE, ABS_X..."
     (with-slots (cl-evdev::value cl-evdev::type) event
       (let ((axis (cadr type)))
  -      (print `(AXIS IS ,axis))
         (cond ((equal axis 'cl-evdev::ABS_PRESSURE) (setq pressure cl-evdev::value))
   	    ((equal axis 'cl-evdev::ABS_X) (setq abs-x cl-evdev::value))
   	    ((equal axis 'cl-evdev::ABS_Y) (setq abs-y cl-evdev::value)))      
  -      (setq color (/ pressure 700.0))
  -      
  -      (print `(ABS_X ,abs-x 'ABS_Y ,abs-y))
  -      (print `(ABS_PRESSURE ,pressure))
  -      (if (> pressure 0)	  
  -       	  (set-grid  (round (* abs-x .020))	   
  -		     (round (* abs-y .040))
  -		     (list 0 0 color)))
  -      (glut:post-redisplay))))
  +      ;;(print (list abs-x abs-y)) 
  +      (setq pressure (coerce pressure 'float))
  +      (if (> pressure 5)
  +	  (loop for r from 0 upto tool-size do
  +	       (pen-draw (round (/ (+ r abs-x) 58.0))
  +			 (round (/ (+ r abs-y) 88.0))
  +			 (pen-draw-color)
  +			 )) ))))
  +
  +(setq tool-size 40)
  +(defparameter pen-hue '(0.0 0.0 0.3))
  +(defparameter pressure-const 311.0)
  +
  +
  +(defun pen-draw-color () `(0 0 0))
  +(defun pen-draw-color ()
  +  `(,(+ 0 (first pen-hue))
  +    ,(+ (second pen-hue) (/ pressure pressure-const))
  +   ,(+ 0 (third pen-hue))))
   
   (defun handle-scroll (event)
  +  "scroll event handler"
     (with-slots (cl-evdev::value) event
         (if (= cl-evdev::value 1)
   	  (setq tool-size (+ 1 tool-size))
   	  (setq tool-size (- 1 tool-size)))))
   
   (defun handle-button (event)
  +  "button event handler"
     (with-slots (cl-evdev::name) event
       (if (equal cl-evdev::name 'BTNBACK)
  -	(clear-grid grid-size))
  +	(clear-color svart))
       (with-slots (spin) mask
         (setf spin (mod (+ spin 30) 360)))))
   
   (defun process-wacom-stream ()
  +  "Wacom RELATIVE ABSOLUTE or KEYBOARD event process"
     (cl-evdev::with-evdev-device 
         (in evdev-device-file)
  -    (print `(type of ,(Type-of in)))
  +    ;;(print `(type of ,(Type-of in)))
       (cond ((typep in 'cl-evdev::RELATIVE-EVENT)
   	   (handle-scroll in))
   	  ((typep in 'cl-evdev::ABSOLUTE-EVENT)
   	   (handle-pen in))
   	  ((typep in 'cl-evdev::KEYBOARD-EVENT)
   	   (handle-button in))
  -	  (t nil))))
  +	  (t nil))
  +    (glut:post-redisplay)))
   
   (defclass wa-mask (glut:window)
     ((spin :initform 0))
  
positive.code:   (glut:display-window mask))
  
  (defun wa ()
    (bordeaux-threads:make-thread
     'process-wacom-stream :name "wacom-stream-process")
    (bordeaux-threads:make-thread
     'gl-window :name "gl window"))
  
negative.code:     (gl:vertex j k l)))
  
  (defun grid-color (x y)
    "set the GL and grid drawing color"
    (setq rgb (aref grid x y))
    (gl:color (first rgb)  (second rgb) (third rgb))
    rgb)
  
  (defun closnuf (x y)
    (< (abs (- x y)) 5))
  
  
  (defmethod glut:display ((w wa-mask))
    "OpenGL display draw loop, quad drawing"
    (gl:clear :color-buffer)  
    (gl:disable :lighting)
    (loop for x from 0 to (- grid-size 1) do   
         (loop for y from 0 to (- grid-size 1) do  
  	    (setq j (- grid-size (+ 1 y))
  		  factor .010) ;; 0018
  	    (setq px (floor (/ abs-x 58.0))
  		  py (floor (/ abs-y 88.0)))
  ;;	    (gl:color (first rgb)  (second rgb) (third rgb))	    
  	    (if (not (eq (grid-color x j) '(0 0 0)))		
  		(quad (* factor x) (* factor y) 0
  		      (* factor (+ 1 x)) (* factor y) 0
  		      (* factor (+ 1 x)) (* factor (+ 1 y)) 0
  		      (* factor x) (* factor (+ 1 y)) 0))
  	    (setq rgb '(1 1 1))
  	    (if (closnuf y py)
  		(quad (* factor x) (* factor y) 0
  		      (* factor (+ 1 x)) (* factor y) 0
  		      (* factor (+ 1 x)) (* factor (+ 1 y)) 0
  