Re: Getting a pointer to a cairo context?
Espen S Johnsen <[email protected]> 08 Apr 2008 19:44:57 +0200
| Newsgroups | gmane.lisp.clg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hazen Babcock <[email protected]> writes: > It is possible to get a pointer to a cairo context? I thought that > perhaps (gffi::foreign-location cr) would do it, but passing this to > the code that expects a pointer to a cairo context seems to crash my > (SBCL) Lisp process. > I hoped that something like this might work: > > (gdk:with-cairo-context (cr (widget-window drawing-area)) > (multiple-value-bind (width height) > (widget-get-size-allocation drawing-area) > (cairo:scale cr width height)) > (draw-a-plot (gffi::foreign-location cr))) This should be correct as far as i can tell, but I couldn't figure out how to use cl-plplot with cairo so I wasn't able to do any testing. If you could provide some example code I could try to reproduce the crash. -- Espen ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone