|
From: Ethan M. <merritt@u.washington.edu> - 2005-08-18 17:09:16
|
On Wednesday 17 August 2005 11:16 am, Theo Hopman wrote:
> Theo Hopman wrote:
>
> Meh...this doesn't work as well as I think it should. The various
> paletted terminals agree better now, but the colours are still wrong,
After mulling things over in my head last night, I think Theo's
approach, clever as it is, is the wrong way to go. Drivers which
are capable of rgb output already support a mechanism for requesting
specific rgb triples.
t_colorspec *color;
color->type == TC_RGB;
color->lt = 24_bit_packed_rgb_triple;
term->set_color(color);
What we are missing is a way to select this method of color generation
rather than the usual pm3d palette functions.
We should expand the syntax for "with" to provide an alternative
in parallel to "with palette". Something like
splot <foo> 1:2:3:4 with palette # Takes gray value from $4
splot <foo> 1:2:3:4 with rgb # Takes packed rgb triple from $4
We already have such a keyword for specifying individual line styles,
text styles, etc. Extending it to the overall plot style seems both
obvious and easy to do. The input routine in df_readline() should
handle packed hexadecimal values as is, so data files can look like:
# X Y Z RGB
#=========================
255 0 255 0xFF00FF
0 127 0 0x000f00
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|