[GRASS5] How to get monitor background color?

Markus Neteler neteler at itc.it
Fri Nov 2 08:58:38 EST 2001


On Wed, Oct 31, 2001 at 11:23:56PM +0000, Glynn Clements wrote:
> Basically, choose a value for the longest colour name which is likely
> to be used as the erase colour. Currently, this is 8 bytes ("magenta"
> is 7, plus the terminating NUL). Even allowing for future expansion, a
> 32-byte buffer should be more than sufficient (the longest colour name
> in rgb.txt is LightGoldenrodYellow, which is 20 characters).

So, back on d.area:

I have added in src/includes/colors.h
#define MAX_COLOR_LEN 32 /* max length of color string */
#define MAX_COLOR_NUM 13 /* number of coded colors */

and implemented the background color filter for "d.area -f" mode.
Now all areas are filled when using -f, but the monitor background
color is omitted. The prevents confusion as otherwise areas filled
with monitor background color seemed to be non-existing.

Let me know if problems occur,

cheers

 Markus



More information about the grass-dev mailing list