anchor.diff:  (defmethod allocate-foreign ((surface image-surface) &key source type
   			     width height stride format)
     (etypecase source
  -   (stream
  +   (null (%image-surface-create format width height))
  +   ((or stream function symbol)
       (let ((stream-id (register-user-data source)))
         (unwind-protect
   	   (cond
  
positive.code:       ((error "Can't handle image type ~A" type))))
     (pointer
      (%image-surface-create-for-data source format width height 
       (or stride (format-stride-for-width format width))))
     (null (%image-surface-create format width height))))
  
  #?(pkg-exists-p "cairo" :atleast-version "1.6")
  (defbinding format-stride-for-width () int
  
negative.code: ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  
  ;; $Id: cairo.lisp,v 1.25 2009-02-09 11:45:03 espen Exp $
  
  (in-package "CAIRO")
  
  