[Haskell-cafe] Drawing an existing image into a cairo surface?

Austin Seipp mad.one at gmail.com
Sun Sep 21 08:39:53 EDT 2008

Excerpts from Rafal Kolanski's message of Sun Sep 21 07:28:37 -0500 2008:
> The best I can find is withImageSurfaceFromPNG, but I can't
> make it work.

Why not? Seems to me all you need to do is:

 withImageSurfaceFromPNG "blah.png" $ \surface -> do

Lots of code is written this way (create a resource, pass it to a
function and then release it after the function is over.)

> I tried playing around with unsafePerformIO but that just gets me into:

Without further context as to what you are doing, I really see no
reason why you would have to use unsafePerformIO at all.


More information about the Haskell-Cafe mailing list