[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA-user: background color and PNG out



[snip]
>My only suggestion would be to have seperate color maps for each 
>output device. For example a color number of "2" could be mapped
>to green for the sceen, Black for the postscript printer and green
>for the PNG output. That way you could have a white line on a 
>black screen and still be able to see it if printed on a white
>sheet of paper.
[snip]

	Yes, the color maps are actually seperate right now.  Funny,
as I was responding to your first color messages, I was thinking that
was excessive, but now I'm glad it is the way it is. 

	A bit more detail.  In gschem-[dark|light]bg there are lines like
this:

(graphic-color 3 "green4" "green4" "0 .54 0" 0 139 0)

Where:

	graphic-color is the guile keyword
	3 is the color index (don't change this *ever*)
        The first string is the X color name
        The second string is the outline X color name
        The third string is the postscript color string (RGB between 0..1)
        And the final 3 integers are the RGB values for PNG image files 

I think that should provide enough flexiblity for the output.  This scheme
is okay for two output formats, but doesn't scale too well for more than
two (i.e. if I had HPGL or direct SVG output).  I might have generalize
the mechanism as the number of output formats grows (though it has been
at two for a long time now).

								-Ales