All,<br><br>Some of you may find this useful....<br><br>I&#39;ve been looking into ways of creating antialised GrADS images which
do not have those distracting horizontal lines into them. After several
hacks which were too slow to meet my real time requirements (including
a metafile translator based on the ImageMagick API) I ended up using
the Cairo Vector Graphics Library:
<br><br>&nbsp; <a href="http://cairographics.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://cairographics.org/</a><br><br>to write yet another gx translator: gxyat.c (see source and gxyat.1

 man page attached). Cairo is being used by many
big projects such as gtk and firefox and it is very simple to use. This translator produces PNG, SVG, PS or PDF, although I&#39;d still recommend Matt&#39;s gxeps for postscript output. <br><br>Sorry, but I am not providing binaries, just the attached sources. Details on building gxyat and comparison to other translators are bellow.
<br><br>&nbsp; Enjoy,<br><br>&nbsp;&nbsp;&nbsp; Arlindo<br><br><br>1) Building gxyat<br><br>To build gxyat, first build cairo. I&#39;d suggest grabbing the
latest v1.4.6 tarball from the site above and doing configure+make.
Don&#39;t worry if it cannot find freetype or any font related dependency
as GrADS draws its own fonts. Cairo is amazingly self-contained for a
package of this nature. I have easily built cairo on Linux and on my G5
laptop running Mac OS/X 10.4; it also builds natively on Windows, and
pre-compiled libcairo.dll are available (I have done this yet). Once you have cairo, building
gxyat is trivial:<br>
<br>
% gcc -o gxyat -I/usr/local/include/cairo
gxyat.c -L/usr/local/lib -lcairo<br>
<br>
Type
&#39;gxyat&#39; for a man page (see gxyat.1 attached) and try the examples.
When running it, make sure it finds the libcairo.so you just built, not
the one in /usr/lib. Although this usually works, in one case I got a
float point exception when an ancient version of cairo was already
installed on my system. To check which&nbsp; .so&#39;s are being seen, type &quot;ldd
gxyat&quot;, and set LD_LIBRARY_PATH if you need to.
On Mac OS X you set DYLD_LIBRRAY_PATH instead - how annoying!<br><br>2) Comparison to other translators<br><br>I am attaching some GrADS images generated with various translators for comparison. The built in <span id="st" name="st" class="st">
printim</span>
is fast but has the poorest quality, particularly the fonts;&nbsp; I suspect
one of its problems may the integer arithmetic in the reimplemented
line drawing code (I had a similar quality problem in gximg until I
switched some of the coordinate variables to double). <br><br>One alternative
to have smoother fonts is to go through gm-&gt;eps-&gt;png using
convert, which in turn uses ghostscript to render the&nbsp; image; the
result is file &quot;
ghostscript.png&quot; which has the now classic horizontal lines due to
&quot;fringing&quot; in the antialiasing algorithm; this process is also slow.
The file gxyat.png was produced with the new utility; there I draw all
lines with anti-aliasing on, but turn it off when doing color fills.
Because anti-aliasing usually makes the lines wider, any potential
mismatch between shaded contours and contour lines is hardly noticeable
(specially if you are 40 or older :-). The new utility is also very
fast. As a bonus, one is also able to create PS, PDF and Scalar Vector
Graphics (SVG). The latter is a W3C specification and&nbsp; has native
support in firefox since v1.5 (IE still needs a plugin from Adobe). SVG
also allows you to use vector editors such as Adobe illustrator or
Inkscape on Linux to embelish your images, yet keeping it fully
scalable. I&#39;d think that GIS applications would support SVG as well,
but I have no experience with these. SVG is growing on me. The PDF
option can also be handy to e-mail someone a whole batch of images in a
single file.
I&#39;d stick with gxeps for postscript at this point.<br><br><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>