[GRASS-dev] XDRIVER

roger at spinn.net roger at spinn.net
Wed Apr 13 14:11:10 EDT 2011


Devs, 

I'm aware that XDRIVER is antiquated piece of software that the project does 
not intend to use for it's primary display or interactive tool.  I have two 
main questions (and maybe some to follow up): 

Does the project intend to retain XDRIVER in the distribution? 

Are there any plans to update or upgrade XDRIVER? 

As a bit of background, I use a Tcl/TK GUI for GRASS that I have been 
developing incrementally since roughly 1997, so not only is the GUI fairly 
well-developed but I'm pretty accustomed to it and I intend to keep it.  The 
GUI uses XDRIVER as it's primary display and interactive tool and ps.map for 
high quality output. 

I recently started developing a module that would let me interactively 
construct map annotations using points, lines, arrows, rectangles, 
polylines, polygons and text.  When I started constructing the text 
capability I found that R_get_text_box() produced grossly incorrect results. 
That compounded the problem with low quality of the screen fonts -- even 
using FreeType2. 

I remedied the problem by adding libXft to XDRIVER.  That gave me 
high-quality, antialiased, client-side fonts and replaced all of the 
font-handling and rendering capabilities currently in GRASS.  And it 
enormously simplified the code.  And R_get_text_box() produces the right 
result. 

Adding Xft changed the behavior of some text and font modules: label 
placement in d.vect is great, but d.font didn't work and d.paint.labels 
references labels incorrectly.  There are probably other changes that I'll 
find later. 

The effort it takes for me to maintain these changes could mean that I am 
stuck with my current GRASS version unless I rebuild all of the necessary 
changes into every future update.  That could become a large effort, 
particularly if I go on to add keyboard interaction and a few other changes 
that I'm contemplating.  Fortunately, GRASS has become pretty stable, so I 
don't have immediate problems. The alternative is that -- if there are 
enough other users interested -- the project could incorporate some of the 
changes in their code base.  Is there enough interest to justify that? 


Roger Miller


More information about the grass-dev mailing list