[GRASSLIST:2599] Re: [GRASS5] RE: RE: d.area: areas filled with various colors

Eric G. Miller egm2 at jps.net
Tue Oct 23 02:14:09 EDT 2001


On Tue, 23 Oct 2001 05:50:52 +0100, Glynn Clements <glynn.clements at virgin.net> wrote:

> 
> Eric G. Miller wrote:
> 
> > > With respect to the new vector format expected in Grass5.1(?), I was
> > > wondering if this automatic color filling is planned.  When dealing with
> > > very large vector maps we need some way to do this.  At present I just
> > > convert my map to raster and create categories.  This does not create too
> > > many problems but certainly working directly with the vectors will be
> > > better.
> > 
> > This is more a limitation imposed by the GRASS display architechture than
> > anything with the vector data representation.
> 
> This is a limitation imposed by vector layers not having colour
> tables.

So your saying if I used R_color() to set a color, and then
subsequently performed a vector drawing command that the display
drivers would do the right thing?  I was under the impression that
vector and text graphics were limited to the named colors.

programming manual:

16.9 Colors 

int D_reset_colors (struct Colors *colors) 
  Turns color information provided in the colors structure into color
  requests to the graphics driver. These colors are for raster graphics,
  not lines or text. See 12.10.3 Raster Color Table (p. 116) for GIS 
  Library routines which use this structure.

int D_translate_color (char *name)
  Takes a color name in ascii and returns the color number for that color.
  Returns 0 if color is not known. The color number returned is for lines
  and text, not raster graphics.

Perhaps, I misunderstood these statements?

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-user mailing list