[GRASS5] d.grid with numbers

Hamish hamish_nospam at yahoo.com
Wed Oct 19 04:40:51 EDT 2005


Hi,

I just added text support for d.grid. Text takes the color of the grid
lines. It formats lat & lon pretty too. I added in the (minimal)
infrastructure to allow Bob's new geogrid capability to draw it too, but
I leave it to him to mess with his code. It would mostly be a cut &
paste job from plot_grid(), but with a little more trig ;) to get the
screen start coordinates and rotation factor correct.

I don't guarantee that FreeType fonts (set with d.font.freetype) won't
fall off the edge of the screen as the width may be slightly more than
the default fonts'. I tested Vera.ttf and that still looked ok. If it's 
a problem with a common font we can tweak the numbers inwards a little.

No test to stop overlapping numbers.

You can disable it with the -t flag.

I don't have any plans to allow the text color to deviate from the grid
line color, but of course someone else is free to add it if they want
that. I think the default colors should match anyhow.


enjoy,
Hamish




More information about the grass-dev mailing list