Hi
I want to create a null pdf surface to be used for calculating metrics without writing a file. See:
http://cairographics.org/manual/cairo-pdf-surface.html#cairo-pdf-surface-cre...
But, with something like:
(defmacro with-pdf-file ((filename width height) &body body) "Execute the body with context bound to a newly created pdf file, and close it after executing body." `(let* ((*context* (create-pdf-context ,filename ,width ,height))) (unwind-protect (progn ,@body) (destroy *context*))))
(with-pdf-file ((cffi:null-pointer) 500 500) (move-to 100 100) (line-to 200 200) (stroke))
I get (a bunch of) errors spit out:
WARNING: function returned with status WRITE-ERROR.
So I guess it's not working properly. Is there a different way I could try specifying that "NULL" gets passed into the cairo function perhaps? Or is this perhaps just a bug in cairo itself?
scott