[GRASS5] Re: [GRASSLIST:7805] Re: d.legend not showing up in d.out.png

Glynn Clements glynn at gclements.plus.com
Sat Aug 6 09:51:42 EDT 2005


Hamish wrote:

> > gripe with the PNG driver: it doesn't respect d.font.freetype
> > settings.
> 
> another: default background color is still black?
> (maybe it is just me)

	p = getenv("GRASS_BACKGROUNDCOLOR");
	if (p && *p && sscanf(p, "%x", &bgcol) == 1)
	{
		int r = (bgcol >> 16) & 0xff;
		int g = (bgcol >>  8) & 0xff;
		int b = (bgcol >>  0) & 0xff;
		int color = _get_lookup_for_color(r, g, b);

		clear(color);
	}
	else
	{
		int color = (strcmp(DEFAULT_FG_COLOR, "white") == 0)
			? _get_lookup_for_color(255, 255, 255)
			: _get_lookup_for_color(0, 0, 0);

		clear(color);
	}

I suspect that it should be checking DEFAULT_BG_COLOR rather than
DEFAULT_FG_COLOR.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list