[cairo] Cairo bindings question

Paolo Martini p.martini at neuralnoise.com
Sat Aug 6 09:09:41 PDT 2005


Hello,

First of all thank you very much for the work on this library, it's
simply the best ;-)

I'm writing (thanking Abrahm Egnor's work[1]) the Haskell Cairo bindings
and integrating them in the Gtk2Hs[2] bindings, for the Google Summer of
Code programme[3].

I'm stuck on this issue, from the documentation of cairo_create():

     Note that there are restrictions on using the same surface in
     multiple contexts at the same time. If, after creating cr_a with
     surface you also create cr_b with the same surface, you must ensure
     that cr_b has finished using surface before resuming use of cr_a.
     Currently, the only way time at which this is guaranteed is when the
     the last reference to cr_b is released with cairo_destroy(). (XXX:
     We need to add a cairo_finish() call to provide a way to achieve
     this explicitly). See also the CAIRO_STATUS_BAD_NESTING status.

What do the other foreign language binding in this case?  Do they hope
the user will not commit errors or do they provide an interface to
enforce the policy?  Also, in what direction the developement of this
and the related function is going (e.g. the XXX)?

Best,
Paolo Martini.

P.S. I'm keeping a blog[4] about the project, if you care :-)

[1] <http://cairographics.org/hscairo>
[2] <http://haskell.org/gtk2hs/>
[3] <http://code.google.com/summerofcode.html>
[4] <http://haskell.org/gtk2hs/archives/category/cairo>
     (for the feed, append "/feed/rss" to the previous url)
--



More information about the cairo mailing list