<p dir="ltr">No, I'm suggesting that while I think a real binding to cairo would be a good idea, it should be based on the code already in racket/draw and that the code in my library is probably useless. Feel free to use any of it that you find useful, though.</p>
<p dir="ltr">Sam</p>
<div class="gmail_quote">On Sep 27, 2014 5:08 AM, "Antti Karttunen" <<a href="mailto:antti.karttunen@gmail.com">antti.karttunen@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 26, 2014 at 4:05 PM, Sam Tobin-Hochstadt <span dir="ltr"><<a href="mailto:samth@cs.indiana.edu" target="_blank">samth@cs.indiana.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Instead of changing my Planet package, it would be better to provide<br>
an FFI to cairo based on the existing one that's in the library you<br>
mention. I don't think any of my package would be useful for that,<br>
though.<br></blockquote><div><br></div><div><br>Did I understand right that your cairo.ss is intended to work with some substantially earlier version of Cairo-library, and you want to keep it that way?<br><br></div><div>In any case, at least I realized that <br></div><div>(require racket/draw/unsafe/cairo-lib)<br>followed by (define libcairo cairo-lib)<br><br>is (just ?) a more portable way of saying:<span><br><br>(define libcairo (ffi-lib "libcairo"))<br></span></div><div><span>[Or in Windows: </span><span>(define libcairo (ffi-lib "libcairo-2")) </span><span>because it is called libcairo-2.dll]<br></span></div><div><span><br>Like this:<br>#lang racket<br>(require racket/draw/unsafe/cairo-lib)<br>(require ffi/unsafe)<br><br>cairo-lib<br>#<ffi-lib><br>> (define libcairo (ffi-lib "libcairo"))<br>. . ffi-lib: couldn't open "libcairo.dll" (The specified module could not be found.; errno=126)<br>> (define libcairo (ffi-lib "libcairo-2"))<br>> libcairo<br>#<ffi-lib><br>> (eq? cairo-lib libcairo)<br>#t<br>> <br><br>--------------------<br><br><br></span></div><div><span>So I guess making my own set of bindings shouldn't be too much of racket-science...<br></span></div><div><span><br><br></span></div><div><span>Best,<br><br>Antti<br><br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Sam<br>
<div><div><br>
On Fri, Sep 26, 2014 at 8:44 AM, Antti Karttunen<br>
<<a href="mailto:antti.karttunen@gmail.com" target="_blank">antti.karttunen@gmail.com</a>> wrote:<br>
><br>
> Another question:<br>
><br>
> Would it be a big job to edit the bindings in<br>
> <a href="http://planet.racket-lang.org/package-source/samth/cairo.plt/1/0/cairo.ss" target="_blank">http://planet.racket-lang.org/package-source/samth/cairo.plt/1/0/cairo.ss</a><br>
> so that it worked with the current<br>
><br>
> (require racket/draw/unsafe/cairo-lib)<br>
><br>
> cairo-lib<br>
> #<ffi-lib><br>
><br>
> ?<br>
><br>
> I guess it's not just question of "deprecated names for Cairo functions" as<br>
> mentioned in the ticket:<br>
> <a href="http://planet.racket-lang.org/trac/ticket/357" target="_blank">http://planet.racket-lang.org/trac/ticket/357</a><br>
><br>
> but also code like: (define libcairo (ffi-lib "libcairo"))<br>
><br>
> right in the beginning of .../samth/cairo.plt/1/0/cairo.ss<br>
> ?<br>
><br>
><br>
> Yours,<br>
><br>
> Antti Karttunen<br>
><br>
><br>
</div></div>> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
><br>
</blockquote></div><br></div></div>
</blockquote></div>