[GRASS-dev] Cairo monitor driver

Lars Ahlzen lars at ahlzen.com
Sun Oct 14 15:29:06 EDT 2007


Glynn Clements wrote:

>> * High quality antialiased output. See 
>> http://lars.ahlzen.com/cairograss/ for a few simple examples and a 
>> comparison with the PNG driver.
> 
> One thing to be careful of with anti-aliasing is tesselations. Issues
> with Ghostscript's anti-aliasing option are a regular topic on the GMT
> list.

Good point.

I don't know how well this driver handles that. During my own use i 
haven't *noticed* any issues, but you or some one else might have good 
test cases to try once I post the code.

>> My main question is: Does all of this seem useful to anyone else? I do 
>> realize that most of these things can be achieved in other ways, but 
>> I've personally found this driver to produce high quality output in a 
>> very convenient way. Feedback is appreciated!
> 
> The main thing to bear in mind is that the graphics system is going to
> be completely re-written for 7.x.

If that's the case (I actually wasn't aware; I haven't followed 
grass-dev for that long), I guess it isn't worth spending an enormous 
amount of effort on something like this. It may still be useful in the 
meantime, though.

> If Cairo is available for both Windows and MacOSX (natively, i.e. not
> requiring X11), and does an adequate job of PostScript generation
> (embedding a pre-rendered image in a PostScript file doesn't count),
> it could be a viable basis for the new graphics architecture.

It is native cross-platform. According to the docs, it even uses 
hardware acceleration where available.

And yes, it produces real, actual vector output (PS, PDF and supposedly 
SVG although I had some issues with that), not just a bitmap with a 
PS/PDF header. There are some PDF examples rendered with the CAIRO GRASS 
driver at http://lars.ahlzen.com/cairograss/

There are also (currently experimental) support for OpenGL output, which 
may be useful if one wanted the new graphics architecture to support 
nviz and realtime graphics.

For Mac there's Quartz in the works, too.

Btw, IMO Cairo would be an excellent candidate to base a new 
graphics/rendering system on.

>> I can of course post code too, if anyone would be interested in actually 
>> trying it.
> 
> The code would certainly be useful.

Will post. :)

/ Lars

-- 
Lars Ahlzen
lars at ahlzen.com




More information about the grass-dev mailing list