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

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)

Hamish

____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs

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@gclements.plus.com>