[GRASS5] ps.map colortable bug

Hamish hamish_nospam at yahoo.com
Tue Jun 14 06:42:53 EDT 2005


Hi,


I'm trying to track down a bug in ps.map's colortable instruction.

Category based maps won't draw category labels (at a readable size) without
setting "width" to something (big).

This works fine in 5.4 (ie you don't have to set width to use cat labels).


I've tracked it down to this code in grass6/ps/ps.map/r_colortable.c:

    if ( w > 0 ) { 
        ct.width = w;
    } else {
        ct.width = 2 * ct.fontsize / 72.0 ;
    }


If I comment out everything but "ct.width = w;" it works fine.
(after this in ps_clrtbl.c it auto-sets the width if not given)

Does anyone have an idea what this code is trying to do?

Perhaps it is trying to do & missing  char_width*strlen(longest label) ?

I'm hesitant to rip it out without knowing what it is trying to do.


thanks,
Hamish




More information about the grass-dev mailing list