]> Pileus Git - ~andy/rsl/blob - doc/RSL_color_table.html
RSL v1.44
[~andy/rsl] / doc / RSL_color_table.html
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5    <meta name="GENERATOR" content="Mozilla/4.5 [en] (X11; U; Linux 2.0.32 i686) [Netscape]">
6 </head>
7 <body>
8 <a href="index.html"><img SRC="rsl.gif" height=100 width=100></a>
9 <hr>
10 <h1>
11 RSL_get_color_table<br>
12 RSL_set_color_table</h1>
13
14 <h1>
15
16 <hr></h1>
17
18 <h3>
19 Synopsis</h3>
20 <b>#include "rsl.h"</b>
21 <br><b>void RSL_get_color_table(int icolor, char buffer[256], int *ncolors)</b>
22 <br><b>void RSL_set_color_table(int icolor, char buffer[256], int ncolors)</b>
23 <h3>
24
25 <hr>Description</h3>
26 <b>RSL_get_color_table</b>: Given a color table index, one of <b>RSL_RED_TABLE</b>,
27 <b>RSL_GREEN_TABLE</b> or <b>RSL_BLUE_TABLE</b>, return up to 256 color
28 indexes each containing the color intensity for that color at each index.&nbsp;
29 The number of colors in the table is indicated in <b>*ncolors</b>.
30 <p>RSL_set_color_table: Given a color table index <b>icolor</b>, one of
31 <b>RSL_RED_TABLE</b>, <b>RSL_GREEN_TABLE</b> or <b>RSL_BLUE_TABLE</b>,&nbsp;
32 and a character buffer, at most 256 color indexes long, and the number
33 of indexes in the character buffer, set the color table.&nbsp; Each color
34 index in <b>buffer</b> contains the color intensity for that color.&nbsp;
35 Range of color intensities is 0 to 255.
36 <p>You must make three calls to both the get and set functions to change
37 the entire color table entry for a particular index.&nbsp; For example,
38 to change the 5<sup>th</sup> index of the color table to cyan (Red=0, Green=255,
39 Blue=255), perform the following (provided a color table is already loaded):
40 <p><tt>char r[256], g[256], b[256];</tt>
41 <br><tt>RSL_get_color_table(RSL_RED_TABLE,&nbsp;&nbsp; r, &amp;ncolors);</tt>
42 <br><tt>RSL_get_color_table(RSL_GREEN_TABLE, g, &amp;ncolors);</tt>
43 <br><tt>RSL_get_color_table(RSL_BLUE_TABLE,&nbsp; b, &amp;ncolors);</tt><tt></tt>
44 <p><tt>r[4] = (char)0;&nbsp;&nbsp;&nbsp; /* [4] is the 5-th index */</tt>
45 <br><tt>g[4] = (char)255;</tt>
46 <br><tt>b[4] = (char)255;</tt><tt></tt>
47 <p><tt>RSL_set_color_table(RSL_RED_TABLE,&nbsp;&nbsp; r, ncolors);</tt>
48 <br><tt>RSL_set_color_table(RSL_GREEN_TABLE, g, ncolors);</tt>
49 <br><tt>RSL_set_color_table(RSL_BLUE_TABLE,&nbsp; b, ncolors);</tt>
50 <br><tt></tt>&nbsp;
51 <br><tt></tt>&nbsp;<tt></tt>
52 <p>
53 <hr>
54 <h3>
55 Return value</h3>
56 None.&nbsp;
57 <hr>
58 <h3>
59 See also</h3>
60 <a href="RSL_rebin_velocity.html">RSL_rebin_velocity_ray</a>, <a href="RSL_rebin_velocity.html">RSL_rebin_velocity_sweep</a>,
61 <a href="RSL_rebin_velocity.html">RSL_rebin_velocity_volume</a>,
62 <br><a href="RSL_sweep_to.html">RSL_sweep_to_gif</a>, <a href="RSL_sweep_to.html">RSL_sweep_to_pict</a>,
63 <a href="RSL_sweep_to.html">Vsweep_to_pgm</a>,
64 <a href="RSL_sweep_to.html">Vsweep_to_ppm</a>,
65 <br><a href="RSL_load_color_table.html">RSL_load_color_table</a>, <a href="RSL_load_color_table.html">RSL_load_green_table</a>,
66 <a href="RSL_load_color_table.html">RSL_load_red_table</a>,
67 <a href="RSL_load_color_table.html">RSL_load_blue_table</a>,
68 <br><a href="RSL_load_color_table.html">RSL_load_refl_color_table</a>,
69 <a href="RSL_load_color_table.html">RSL_load_sw_color_table</a>,
70 <a href="RSL_load_color_table.html">RSL_load_vel_color_table</a>,
71 <br><a href="RSL_volume_to.html">RSL_volume_to_gif</a>, <a href="RSL_volume_to.html">RSL_volume_to_pict</a>,
72 <a href="RSL_volume_to.html">RSL_volume_to_pgm</a>,
73 <a href="RSL_volume_to.html">RSL_volume_to_ppm</a>.&nbsp;
74 <hr>
75 <p>Author: <a href="john.merritt.html">John H. Merritt</a>
76 </body>
77 </html>