1TDCLRS(3NCARG) NCAR GRAPHICS TDCLRS(3NCARG)
2
3
4
6 TDCLRS - Does GKS calls to define colors for TDPACK.
7
9 CALL TDCLRS (IWID, IBOW, SHDE, SHDR, IOFC, IOLC, ILMT)
10
12 #include <ncarg/ncargC.h>
13
14 void c_tdclrs(int iwid, int ibow, float shde, float shdr, int iofc, int
15 iolc, int ilmt)
16
18 This routine is called to do the GKS calls defining the following
19 colors on a specified workstation (NSHD is equal to IOLC-IOFC+1, the
20 number of elements in each block of color shades):
21
22 Color 0 = background color (depends on IBOW)
23 Color 1 = foreground color (depends on IBOW)
24 Color 2 = red (RGB values 1,0,0)
25 Color 3 = green (RGB values 0,1,0)
26 Color 4 = blue (RGB values 0,0,1)
27 Color 5 = cyan (RGB values 0,1,1)
28 Color 6 = magenta (RGB values 1,0,1)
29 Color 7 = yellow (RGB values 1,1,0)
30 Colors IOFC - IOLC = grays, white to black
31 Colors IOFC+NSHD - IOLC+NSHD = grays
32 Colors IOFC+2*NSHD - IOLC+2*NSHD = reds
33 Colors IOFC+3*NSHD - IOLC+3*NSHD = greens
34 Colors IOFC+4*NSHD - IOLC+4*NSHD = blues
35 Colors IOFC+5*NSHD - IOLC+5*NSHD = cyans
36 Colors IOFC+6*NSHD - IOLC+6*NSHD = magentas
37 Colors IOFC+7*NSHD - IOLC+7*NSHD = yellows
38
39 The colors defined by calling TDCLRS may be used for any purpose, but
40 they are particularly useful when calling TDPACK routines to render
41 surfaces.
42
43 The arguments of TDCLRS are as follows:
44
45 IWID (an input expression of type INTEGER) - the workstation
46 identifier.
47
48 IBOW (an input expression of type INTEGER) - a flag specifying the
49 basic color scheme (white on black or black on white). If IBOW
50 is 0, the foreground color is white and the background color is
51 black; if IBOW is non-zero, the opposite is true.
52
53 SHDE and SHDR
54 (input expressions of type REAL) - each of these values is
55 between 0 and 1, inclusive, specifying how color shades are to
56 be generated. Values of SHDE near 0 call for more intense
57 shades to be used, while values near 1 call for more nearly
58 pastel shades to be used. Values of SHDR near 0 say that a
59 narrower range of shades is to be used, while values near 1 say
60 that a broader range of shades is to be used.
61
62 IOFC and IOLC
63 (input expressions of type INTEGER) - these specify the first
64 and last integers in a block of color indices to be used for
65 NSHD shades of gray ranging from pure white to pure black
66 (where NSHD=IOLC-IOFC+1). The next NSHD indices (in numerical
67 order) will be used for the shades of gray selected by SHDE and
68 SHDR; the next NSHD indices after that for selected shades of
69 red, the next NSHD indices after that for selected shades of
70 green, and so on.
71
72 ILMT (an input expression of type INTEGER) - Using a value between 1
73 and 7, inclusive, says that only that many blocks of NSHD
74 indices will be defined. For example, if ILMT has the value 4,
75 only the black-to-white scale and the shades of gray, red, and
76 green will be generated; shades of blue, cyan, magenta, and
77 yellow will not be. (This allows one to have more shades of
78 each color at the expense of using fewer colors.) Using a value
79 of ILMT less than 1 or greater than 7 will result in all 8*NSHD
80 sets of color shades being defined.
81
83 The C-binding argument descriptions are the same as the FORTRAN
84 argument descriptions.
85
87 To use TDCLRS or c_tdclrs, load the NCAR Graphics libraries ncarg,
88 ncarg_gks, and ncarg_c, preferably in that order.
89
91 Online: tdctri, tddtri, tdgeti, tdgetr, tdgrds, tdgrid, tdgtrs, tdinit,
92 tditri, tdlbla, tdlbls, tdline, tdlnpa, tdmtri, tdotri, tdpack,
93 tdpack_params, tdpara, tdplch, tdprpa, tdprpi, tdprpt, tdseti, tdsetr,
94 tdsort, tdstri, tdstrs
95
97 Copyright (C) 1987-2009
98 University Corporation for Atmospheric Research
99 The use of this Software is governed by a License Agreement.
100
101
102
103UNIX July 1997 TDCLRS(3NCARG)