anchor.diff:  	(map-c-vector 'vector #'identity data '(unsigned-byte 8) length)))))
     :success)
   
  +(define-callback stream-read-func status 
  +    ((stream-id pointer-data) (data pointer) (length unsigned-int))
  +  (let ((stream (find-user-data stream-id)))
  +    (typecase stream
  +      (stream
  +       (loop for i below length do
  +	(let ((byte (read-byte stream nil)))
  +	  (if byte
  +	      (setf (gffi::ref-uint-8 data i) byte)
  +	    (return-from stream-read-func :read-error)))))
  +      ((or symbol function) (funcall stream data length))))
  +  :success)
  +
   
   (defmacro with-surface ((surface cr) &body body)
     `(let ((,cr (make-instance 'context :target ,surface)))
  
positive.code: 
  ;;; PS Surface
  
  (defmethod allocate-foreign ((surface ps-surface) 
  			     &key filename stream width height)
    (cond
     ((and filename stream)
      (error "Only one of the arguments :filename and :stream may be specified"))
     (filename (%ps-surface-create filename width height))
     (stream 
      (let* ((stream-id (register-user-data stream))
  	   (location (%ps-surface-create-for-stream stream-id width height)))
        (%surface-set-user-data location 'stream stream-id)
        location))))
  
  (defbinding %ps-surface-create () pointer
    (filename pathname)
  
negative.code:       :type int))
      (:metaclass surface-class))
  
    (defclass vector-surface (surface)
      ((width :allocation :virtual :getter surface-width)
       (height :allocation :virtual :setter surface-height))
      (:metaclass surface-class))
  
    (defclass pdf-surface (vector-surface)
      ()
      (:metaclass surface-class))
    
    (defclass ps-surface (vector-surface)
      ()
      (:metaclass surface-class))
      
    (defclass svg-surface (vector-surface)
      ()
      (:metaclass surface-class))
  
  