I am a developer of GrADS, an open-source visualization tool for meteorological data. GrADS is written in C and uses X for its interactive display window. Traditionally, GrADS has had direct calls to the X11 library for the drawing, but we have developed a new interface for the Cairo graphics library to do the X rendering instead.
The problem I am having is with Cairo's rendering when using XQuartz. The graphical elements in a simple contour plot are very basic -- nothing but line segments, some with a large number of vertices. Everything looks right when I use the old X11, but if I use XQuartz, I get an incomplete rendering, where only some of the lines are drawn. If I create an X event by moving another xterm window over my X display window and then move it away, the rendering changes -- some more lines are drawn, but only just a few, nothing close to a complete graphic. If I use the traditional version of GrADS (without Cairo), the rendering is normal with both X11 and XQuartz.
I wrote a stand-alone short C program (
http://iges.org/jma/xdemo.c) to use Cairo to draw a bunch of concentric circles made up of tiny line segments to mimic the GrADS behavior but in a simpler, more portable form. Here are two screen shots that illustrate the problem:
This behavior is seen whether I compile and run my stand-alone program on my laptop, or on a remote unix (CentOS) server that I connect to using 'ssh -Y'.
It is difficult for me to know whether this is a problem with XQuartz or Cairo … I have posted about this in the Cairo forum and got no helpful response, only some advice to 'move away from X', which is not really a viable option. It feels more like an XQuartz bug, I guess mostly because it works fine with the older X11. Can anybody advise me? I need help! This is a potentially catastrophic problem for our users. When X11 is gone for good, we're hosed if GrADS won't work with XQuartz.
Possibly relevant specs:
Mac OS X 10.7.5 (it also fails with 10.8, a colleague with a newer laptop tested it for me)
XQuartz Version: XQuartz 2.7.5_rc2 (xorg-server 1.13.4)
X11 Version: XQuartz 2.6.5 (xorg-server 1.10.6)
Cairo version: 1.12.16
Thank you!!
--Jennifer
--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030