[Xastir-dev] More Map Questions/Suggestions !

Tom Russo russo at bogoflux.losalamos.nm.us
Sat Mar 20 13:24:42 EST 2004


On Sat, Mar 20, 2004 at 09:44:01AM -0800, a Mr. Richard Feyler of Fort Lee, New Jersey <archer at eskimo.com> writes 'Dear Rosanne Rosannadanna':
> On Sat, 20 Mar 2004, James A Vincent wrote:
> 
> >  Yes- Tom Russo has been very helpful.  I still haven't managed to
> >  discover the relationship between the colour=x and the colour
> >  displayed.  Is there a list of colours and their numerical value
> >  ?

Glad to hear it.

> I haven't messed with the dbfawk stuff, so I don't know what they're
> using for colors.  There should be an rgb.txt file on your system
> somewhere that specifies a bunch of colors and their associated
> values.  You can also bring up various tools to determine what the
> hex values are for various colors.

Neither of these things will enlighten you about how the numbers map
to colors.

The color field of the dbfawk file uses the numeric value of indices
into the "colors" array as defined in main.c.  Look for a block of
code near line 7570 (they begin at line 7568 in the version I
currently have checked out).  You'll see many lines where the "colors"
array elements are set to the return values of GetPixelByName on
particular colors.  For example, 0 is DarkGreen, 1 is purple, 2 is
also Dark Green, 3 is cyan, etc.  This block of code in main.c is the 
only map of numeric values to colors you'll find.

It would be nice if one could specify the color name as in rgb.txt instead,
but internally xastir uses only that array of colors so dbfawk simply uses 
indices into that array. 

-- 
Tom Russo    KM5VY     SAR502  DM64ux         http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://www.qsl.net/~km5vy/
 "It is inhumane in my opinion to force people who have a genuine
  medical need for coffee to wait in line behind people who apparently
  view it as some kind of recreational activity."  -- Dave Barry



More information about the Xastir-dev mailing list