-----Original Message-----
From: grass-dev-bounces@grass.itc.it
To: Maciej Sieczka
Cc: Moritz Lennert; 'grass-dev@grass.itc.it'
Sent: 9/15/2006 1:44 AM
Subject: Re: [GRASS-dev] Overlay grids and lines tool in gism fails to
drawgrid in map wi ndow
Maciej Sieczka wrote:
Moritz Lennert wrote:
> Maciej Sieczka wrote:
>> d.grid segfaults for me too if I use RGB triplets for color or
>> bordercolor. If I use names (blue, red etc.) it works.
> Actually it works as long as the RGB values are 0 or 255. As soon as
> they are something else it segfaults.
Hmm, for me it segfaults whatever the values, eg.:
$ d.grid size=2000 origin=0,0 bordercolor=1:1:1
Segmentation fault
d.grid calls D_parse_color() before calling R_open_driver(), which
won't work unless the colour is one of the predefined colours
(D_parse_color() allocates the specified colour within the driver then
returns the index of the allocated colour).
--
Glynn Clements <glynn@gclements.plus.com>
Ok. But d.grid worked for me in late July using the default color settings
in gis.m (some kind of light grey), without having to first use a predefined
color. The manpage says that RGB triplets can be used. Is this no longer the
case then?
Patton, Eric wrote:
Ok. But d.grid worked for me in late July using the default color settings
in gis.m (some kind of light grey), without having to first use a predefined
color. The manpage says that RGB triplets can be used. Is this no longer the
case then?
I see:
revision 2.5
date: 2006/04/18 05:19:49; author: cedric; state: Exp; lines: +6 -38
Added gisprompts for color. Uses simplified (abstracted) color handling. Removed colors.h header.
See diff here: http://freegis.org/cgi-bin/viewcvs.cgi/grass6/display/d.grid/main.c.diff?r1=2.4&r2=2.5
This might be the problem, although it happened in April...
Moritz
Moritz Lennert wrote:
> Ok. But d.grid worked for me in late July using the default color settings
> in gis.m (some kind of light grey), without having to first use a predefined
> color. The manpage says that RGB triplets can be used. Is this no longer the
> case then?
I see:
revision 2.5
date: 2006/04/18 05:19:49; author: cedric; state: Exp; lines: +6 -38
Added gisprompts for color. Uses simplified (abstracted) color handling.
Removed colors.h header.
See diff here:
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/display/d.grid/main.c.diff?r1=2.4&r2=2.5
This might be the problem, although it happened in April...
Revision 2.4 wouldn't have worked either. The R:G:B triplet would be
ignored, and d.grid would use the first available colour after the
predefined colours. Depending upon what you had been doing previously,
that colour *might* already be set to the R:G:B triplet you wanted.
The segfault is due to the recent changes to libraster. Before, any
R_* calls made prior to calling R_open_driver() would be silently
ignored; now, they'll result in a segfault.
--
Glynn Clements <glynn@gclements.plus.com>