[GRASS-dev] Background Colours

Hamish hamish_nospam at yahoo.com
Thu May 17 02:20:56 EDT 2007

Paul Kelly wrote:
> Actually in light of this I don't see any reason why not to change 
> d.histogram back to the old behaviour. The worst that can happen is
> the  histogram is drawn over a map already in a display, but all that
> needs  done then is d.erase or d.frame -e and repeat the d.histogram
> command. But  the big gain is a histogram plot with a transparent
> background. I'll make  the change some time before too long if nobody
> objects. Or we could add a  new flag that doesn't erase and always run
> it from the GUI with that flag  set. I prefer the simplicity of just
> changing it back though (and thus  restoring its behaviour to be in
> accordance with the man page).

I would prefer to add a background color option to d.histogram, with a
default of DEFAULT_BG_COLOR and an option of "none".

Then remove the D_setup() clear flag and draw a rectangle of said color
(or none) that fills the window prior to anything else.

I will do this shortly. (bonus: color= -> RGB)

This doesn't solve the general problem of swapping DEFAULT_FG and
BG_COLOR without a recompile, unless you want all the xmon mapping done
that way.

But I think that d.histogram is the only non-mapping function left that
matters anymore:
 d.profile is replaced by a much nicer Tcl version,
 d.linegraph is better done using gnuplot's PS or SVG drivers
  (+GhostScript/ svg2*).

so a module specific change isn't so bad.

I'll also fix the outdated reference in the man page.


More information about the grass-dev mailing list