[GRASS-dev] Re: not quite there on fonts

Hamish hamish_nospam at yahoo.com
Mon May 14 01:25:22 EDT 2007


Glynn Clements wrote:
> 
> Michael Barton wrote:
> > I'll play around with these. But maybe one of you can check to see
> > if d.histogram will actually accept some kind of background color
> > change or if it is hardcoded to white--so I don't waste a lot of
> > time messing with this in situation where it won't work.
> 
> d.histogram calls:
> 
> 	D_setup(1); /* 1 = clear frame */
> 
> This clears the frame by filling a rectangle thus:
> 
> 	R_standard_color(D_translate_color(DEFAULT_BG_COLOR));
> 	R_box_abs (l, t, r, b);
..
> Regarding d.histogram, it could just use D_setup(0) to avoid erasing
> the frame. I'm guessing that (unlike most modules) it automatically
> erases because the output isn't georeferenced, so there would be no
> reason to overlay it on top of what is already displayed.

FWIW it used to call D_setup(0) and not clear the frame first, but I
changed it to clear the frame, as drawing a graph over a map makes no
sense to me and that lead to it doing the "wrong thing" most of the
time. Before then you could do: (e.g. GRASS 6.0.2)
  d.erase blue; d.histogram mapname

An option could be added to set the background color, but maybe I missed
something- why are we still bothering with the old d.histogram if
Michael has already created a new new wxPython one and the old one
wasn't particularly nice anyway? (axes tags somewhat broken for FP maps)


Hamish




More information about the grass-dev mailing list