[cairo] cairo for R

Adam Goode adam at evdebs.org
Thu Dec 23 22:55:44 PST 2004


I was jealous of Mac OS X users with their Quartz R backend, so a month
ago, I hacked up the R devX11 driver to use Cairo. I cleaned it up a bit
since, but there are a few issues.

Clipping somehow seems to be broken. With cairo 0.1.23 and libpixman
0.1.1, clipping was very slow but pretty much worked. In the CVS
version, clipping is much faster but sometimes goes wrong. To reproduce,
run demo(graphics) and then resize the window to be larger. Parts will
be clipped that shouldn't be. If you try demo(persp), then the last few
demos don't display anything at all. Does something need to be done when
the window resizes?

In devX11.c, if you take out USE_CAIRO_CLIP, it tells R to do all the
clipping itself. For some reason, this makes a couple text labels not
appear near the borders, and I'm not sure if this is an R bug or some
other problem with my code. Try it, to see how fast things are without
Cairo clipping!

This patch just hacks up the old X11 support in place, since I use all
the existing window management code. Probably someone should add it as a
new driver to R, or do something so that the old X11 code doesn't go
away.

Anyway, here it is. The main changes are in src/modules/X11/devX11.[ch].
Just patch your R 2.0.1, configure, and make. Comments welcome!


Thanks,

Adam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: r-2.0.1-cairo-patch.gz
Type: application/x-gzip
Size: 14043 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041224/f3cba4d5/r-2.0.1-cairo-patch.bin


More information about the cairo mailing list