[GRASS5] BUG ps.map grid labels don't show - FIX provided

Mike Thomas miketh at brisbane.paradigmgeo.com
Thu Aug 16 22:38:46 EDT 2001


Hi Markus.


BUGFIX - PS.MAP

Please find attached a diff output to fix for a ps.map problem in which grid
labels are by default set to size 0 and don't show up.  I just made some
macros for sizes and set the default to a nice 8 point size rather than 0.

My feeling is that this should go into the 5.00 release as it is a simple
fix and a major problem.  Note that this is a diff against out of dat code
so the line numbers may be wrong.  I was unable to get through to the CVS
repository to do a CVS diff.


WINDOWS 98

I used Grass 5 (built entirely too) on Window 98 for several hours this week
and it did not crash once.  I used the d3d test script, d.display, v.digit,
d.rast etc as well as finding and fixing the ps.map problem.  I'm very
pleased about this.


HINT - GSVIEW AND PS.MAP

On Windows, ps.map works very nicely in conjunction with gsview, as whenever
gsview detects a file change, it updates the display whenever you make the
window current, so you can make script changes with a Bash shell and editor,
and get a live update to review the changes as you go.


I've CC'ed your personal address as I've had troubles with "waiting for
moderator" messages (in replies to the new address) from the wingrass list
since the move.

Cheers

Mike Thomas.



diff -r file://e/cvs/grass/src/ps.map/ps.map/cmd/getgrid.c
file://e/cvs/grassw98/src/ps.map/ps.map/cmd/getgrid.c
24c24
<     int color=0, fontsize = PS_FONT_DEFAULT_SIZE;
---
>     int color=0, fontsize=0;
69,72c69
<      if ( fontsize < PS_FONT_MIN_SIZE ||
<                  fontsize > PS_FONT_MAX_SIZE ) {
<                 fontsize = PS_FONT_DEFAULT_SIZE;
<             }
---
>      if (fontsize < 4 || fontsize > 50) fontsize = 8;


diff -r file://e/cvs/grass/src/ps.map/ps.map/cmd/ps_info.h
file://e/cvs/grassw98/src/ps.map/ps.map/cmd/ps_info.h
3,11c3,4
<
< /* Font sizes */
< #define PS_FONT_MAX_SIZE      50
< #define PS_FONT_MIN_SIZE       1
< #define PS_FONT_DEFAULT_SIZE   8
<
< #define DELTA_Y                0.05
< #define MAX_PSFILES       20
<
---
> #define DELTA_Y 0.05
> #define MAX_PSFILES 20





More information about the grass-dev mailing list