home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
InfoMagic Source Code 1993 July
/
THE_SOURCE_CODE_CD_ROM.iso
/
X
/
mit
/
doc
/
CLX
/
s09.doc
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Interleaf document
|
1989-10-18
|
43.6 KB
|
1,466 lines
<!OPS, Version = 5.2>
<!Document,
Print Rev Bars = no,
Final Output Device = "ps",
Default Printer = "nearest-adps">
<!Font Definitions,
F2 = Times 10 Italic,
F3 = Times 10,
F4 = Times 8 Italic,
F5 = Times 18 Bold,
F6 = Times 10 Bold,
F7 = Times 18,
F8 = Times 12 Bold,
F9 = Symbol_B 8>
<!Page,
Bottom Margin = 1 inches,
Left Margin = 1 inches,
Right Margin = 1.15 inches,
First Page = Right,
Starting Page # = Inherit,
Page # Prefix = "9<#1e>",
Hyphenation = on,
Consecutive Hyphens = 2,
Vert. Just. = off>
<!Autonumber Stream, List, 2,
Level 2 Suffix = ,
Level 2 Starting Value = 0,
Level 2 Show = no>
<!Autonumber Stream, Outline, 3,
Level 1 Symbol Type = UPPER ROMAN,
Level 2 Symbol Type = UPPER ALPHA>
<!Autonumber Stream, figure, 2,
Level 1 Prefix = "Figure ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = ,
Level 2 Starting Value = 0,
Level 2 Show = no>
<!Autonumber Stream, figurelet, 2,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Prefix = "Figure ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = "<#04>">
<!Autonumber Stream, invisible, 1,
Level 1 Suffix = ,
Level 1 Show = no>
<!Autonumber Stream, item, 2,
Level 2 Symbol Type = LOWER ALPHA,
Level 2 Trail = yes>
<!Autonumber Stream, paralet, 4,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Suffix = ,
Level 1 Show = no,
Level 2 Prefix = .,
Level 2 Suffix = ,
Level 3 Prefix = .,
Level 3 Suffix = ,
Level 4 Prefix = .,
Level 4 Suffix = >
<!Autonumber Stream, paranum, 4,
Level 1 Suffix = ,
Level 1 Show = no,
Level 2 Prefix = .,
Level 2 Suffix = ,
Level 3 Prefix = .,
Level 3 Suffix = ,
Level 4 Prefix = .,
Level 4 Suffix = >
<!Autonumber Stream, table, 2,
Level 1 Prefix = "Table ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = >
<!Autonumber Stream, tablelet, 2,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Prefix = "Table ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = "<#04>">
<!Class, arg,
Bottom Margin = 0.08 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F2,
Left Tab = -0.25/0 inches>
<!Class, bullet,
Bottom Margin = 0.153 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F3,
Allow Page Break Within = no,
Left Tab = -0.50/0 inches>
<!Class, caption,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Font = F4>
<!Class, fig,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Left,
Font = F5>
<!Class, keyword2,
Bottom Margin = 0.153 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F6,
Left Tab = -0.50/0 inches>
<!Class, newpage,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Alignment = Left,
Font = F7,
Hyphenation = off,
New Page = yes,
Left Tab = >
<!Class, p1para,
Bottom Margin = 0.153 inches,
Left Margin = 1.60 inches,
First Indent = -1.60 inches,
Line Spacing = 1.121 lines,
Font = F6,
Allow Page Break Within = no,
Left Tab = -1.60/-0.17/0 inches>
<!Class, p1rule,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Font = F3,
Hyphenation = off,
Allow Page Break After = no,
Left Tab = 0/0.75*13 inches>
<!Class, p1stacked,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
First Indent = -1.60 inches,
Line Spacing = 1 lines,
Font = F6,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -1.60/-0.17/0 inches>
<!Class, p2para,
Bottom Margin = 0.153 inches,
Left Margin = 1.60 inches,
First Indent = -1.60 inches,
Line Spacing = 1.121 lines,
Font = F6,
Left Tab = 0 inches,
Right Tab = -1.60/-0.17 inches>
<!Class, p2rule,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
Line Spacing = 1 lines,
Alignment = Left,
Font = F3,
Hyphenation = off,
Allow Page Break After = no,
Left Tab = 0/0.75*13 inches>
<!Class, p2stacked,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
First Indent = -1.60 inches,
Line Spacing = 1.121 lines,
Font = F6,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = 0 inches,
Right Tab = -1.60/-0.17 inches>
<!Class, para,
Bottom Margin = 0.153 inches,
Left Margin = 1.60 inches,
Line Spacing = 1.121 lines,
Font = F3,
Allow Page Break Within = no,
Left Tab = 0/0.75*13 inches>
<!Class, return,
Bottom Margin = 0.077 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F6,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
<!Class, secno,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Left,
Font = F5,
Autonumber Name = paranum>
<!Class, secrule,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Font = F3,
Hyphenation = off,
Allow Page Break After = no,
Left Tab = 0/0.75*13 inches,
Autonumber Name = table>
<!Class, sectitle,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Alignment = Right,
Font = F5,
Hyphenation = off,
New Page = yes,
Left Tab = 0/0.75*13 inches>
<!Class, syntax,
Bottom Margin = 0.077 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F6,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 8 inches>
<!Class, syntax0,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F6,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 8 inches>
<!Class, "table",
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Font = F6,
Autonumber Name = table>
<!Class, title,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Right,
Font = F5,
TOC Doc Name = TOC>
<!Master Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 0.41 inches,
Height = 0.137 inches,
Vertical Alignment = 0.03 inches,
Diagram =
V4,
(g9,32767,0
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,1,0,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<!Master Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes,
Diagram =
V4,
(g9,1,0
(v4,1,0,0.006667,0.066723,6.326667,0.066611,17,2,0)
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,0,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<!Master Frame,
Name = p2rule,
Placement = At Anchor,
Width = 4.75 inches,
Height = 0.15 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes,
Diagram =
V4,
(g9,1,0
(v4,1,0,4.733333,0.066611,0.006667,0.066723,17,2,0)
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,0,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<First Page Header, Frame =
V4,
(g9,0,0
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,1,1,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<Right Page Header, Frame =
V4,
(g9,1,0
(T8,1,12,4.826667,0.306667,1.533333,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048
,512,102,1101,2,
<caption>
Colors
<End Text>)
(E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<Left Page Header, Frame =
V4,
(g9,1,0
(T8,1,12,0,0.306667,1.533333,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10
2,1101,2,
<caption>
Colors
<End Text>)
(E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<Right Page Footer, Frame =
V4,
(g9,1,0
(t8,1,4,6.333333,0.266667,2,17,@nntimsps10b,\240)
(t8,2,4,0.006667,0.266667,0,17,@nntimsps8i,CLX\ Programmer's\ Reference)
(v4,3,0,0,0.066667,6.333333,0.066554,17,2,0)
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<Left Page Footer, Frame =
V4,
(g9,1,0
(t8,1,4,0,0.266667,0,17,@nntimsps10b,\240)
(t8,2,4,6.333333,0.266667,2,17,@nntimsps8i,CLX\ Programmer's\ Reference)
(v4,3,0,0.026667,0.066667,6.333333,0.066554,17,2,0)
(E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<sectitle,
Allow Page Break Within = no,
Allow Page Break After = no>
<|,"9<#1e>99">
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 4.72 inches,
Height = 0.94 inches,
Vertical Alignment = 0.03 inches,
Diagram =
V4,
(g9,1,0
(T8,1,12,0.133333,0.72,4.563333,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512
,102,1101,3,
<title>
COLORS
<End Text>)
(E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 1.626 inches,
Height = 0.938 inches,
Vertical Alignment = 0 inches,
Diagram =
V4,
(g9,1,0
(T8,1,12,0.066667,0.276667,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10
2,1101,3,
<secno,
TOC Doc Name = TOC>
<Autonum, paranum, 1, First = Yes>
<End Text>)
(T8,2,12,0.026667,0.733333,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10
2,1101,3,
<"table">
<Autonum, table, 1, First = Yes>
<End Text>)
(T8,3,12,0.066667,0.6,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,102,110
1,3,
<fig,
Alignment = Both,
Font = F6,
Autonumber Name = figure>
<Autonum, figure, 1, First = Yes>
<End Text>)
(g9,5,0
(p7,5,8,19
(g9,5,0
(g9,5,0
(v4,5,0,0.266667,0,1.6,0,17,1,0)
(v4,6,0,1.6,0,1.6,0.933333,17,1,0)
(v4,7,0,1.6,0.933333,0.266667,0.933333,17,1,0)
(v4,8,0,0.266667,0.933333,0.266667,0,17,1,0))))
(g9,10,8
(g9,10,1032
(p7,10,8,13
(g9,10,0
(g9,10,0
(v4,10,0,1.268771,0.615801,1.021755,0.615801,17,1,0)
(v4,11,0,1.021755,0.615801,0.887018,0.503208,17,1,0)
(v4,12,0,0.887018,0.503208,0.887018,0.259257,17,1,0)
(v4,13,0,0.887018,0.259257,1.021755,0.146666,17,1,0)
(v4,14,0,1.021755,0.146666,1.33614,0.146666,17,1,0)
(v4,15,32,1.33614,0.146666,1.268771,0.296785,17,0,0)
(v4,16,0,1.268771,0.296785,1.089124,0.296785,17,1,0)
(v4,17,0,1.089124,0.296785,1.089124,0.465677,17,1,0)
(v4,18,0,1.089124,0.465677,1.268771,0.465677,17,1,0)
(v4,19,32,1.268771,0.465677,1.268771,0.615801,17,0,0))))
(p7,21,8,13
(g9,21,0
(g9,21,0
(v4,21,0,1.33614,0.934816,1.021755,0.934816,17,1,0)
(v4,22,0,1.021755,0.934816,0.887018,0.822221,17,1,0)
(v4,23,0,0.887018,0.822221,0.887018,0.709628,17,1,0)
(v4,24,0,0.887018,0.709628,1.089124,0.709628,17,1,0)
(v4,25,0,1.089124,0.709628,1.089124,0.784692,17,1,0)
(v4,26,0,1.089124,0.784692,1.268771,0.784692,17,1,0)
(v4,27,0,1.268771,0.784692,1.268771,0.615801,17,1,0)
(v4,28,32,1.268771,0.615801,1.268771,0.465677,17,0,0)
(v4,29,0,1.268771,0.465677,1.268771,0.296785,17,1,0)
(v4,30,32,1.268771,0.296785,1.33614,0.146666,17,0,0)
(v4,31,0,1.33614,0.146666,1.470876,0.259257,17,1,0)
(v4,32,0,1.470876,0.259257,1.470876,0.822221,17,1,0)
(v4,33,0,1.470876,0.822221,1.33614,0.934816,17,1,0)))))
(g9,34,2048
(v4,34,33,0.819649,0.146666,0.819649,0.146666,17,0,0)
(v4,35,33,0.819649,1.16,0.819649,1.16,17,0,0)
(v4,36,33,1.538245,1.16,1.538245,1.16,17,0,0)
(v4,37,33,1.538245,0.146666,1.538245,0.146666,17,0,0))))
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<secrule,
Allow Page Break Within = no,
Allow Page Break After = yes,
Autonumber Name = >
<Index, "color", To Named = sectitle><Index, "colormap", To Named = sectitle>
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Diagram =
V4,
(g9,1,0
(v4,1,0,0.006667,0.066723,6.333333,0.066611,17,2,0)
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,0,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<p1stacked,
Font = F3,
Left Tab = -1.70/0 inches>
<F8>Colormaps <Tab><F6>9.1<F0><#04>In X, a <F2>color<F0> is defined
by a set of three numeric values,<SP>representing<FJ>
<p1para,
Font = F3,
Left Tab = -1.70/0 inches>
<F8>and Colors<Tab><F0>intensities of red, green, and blue. Red,
green, and blue are<SP> referred to as the <F2>primary<F0> hues.
A <F2>colormap<F0> is a list of<SP> colors, each indexed by an integer <F2>p
ixel<F0> value. Each entry in a<SP> colormap is called a color <F2>cell<F0>.
Raster graphics displays store<SP> pixel values in a special screen
hardware memory. As the screen hardware<SP>scans this memory, it reads
each pixel value, looks up the color in the<SP> corresponding cell
of a colormap, and displays the color on its screen.
<para>
The colormap abstraction applies to all classes of visual types supported
by<SP>X, including those for screens which are actually monochrome.
For example, <F6>:gray<#1e>scale<F0> screens use colormaps in which
colors actually specify the monochrome intensity. A typical black<#1e>and<#1e>w
hite monochrome display has a<SP><F6>:static<#1e>gray<F0> screen
with a two<#1e>cell colormap.
The following list describes how pixel values and colormaps are handled
for each visual class.
<bullet>
<F9>w<Tab><F6>:direct<#1e>color<F0> <#1f> A pixel value is decomposed
into separate red, green, and blue subfields. Each subfield indexes
a separate colormap. Entries in all colormaps can be changed.
<F9>w<Tab><F6>:gray<#1e>scale<F0> <#1f> A pixel value indexes a
single colormap that contains monochrome intensities. Colormap entries
can be changed.
<F9>w<Tab><F6>:pseudo<#1e>color<F0> <#1f> A pixel value indexes
a single colormap that contains color intensities. Colormap entries
can be changed.
<F9>w<Tab><F6>:static<#1e>color<F0> <#1f> Same as <F6>:pseudo<#1e>color
<F0>, except that the colormap entries are predefined by the hardware
and cannot be changed.
<F9>w<Tab><F6>:static<#1e>gray<F0> <#1f> Same as <F6>:gray<#1e>scale<F0>,
except that the colormap entries are predefined by the hardware and
cannot be changed.
<F9>w<Tab><F6>:true<#1e>color<F0> <#1f> Same as <F6>:direct<#1e>color<F0>,
except that the colormap entries are predefined by the hardware and
cannot be changed. Typically, each of the red, green, and blue colormaps
provides a (near) linear ramp of intensity.
<para>
CLX provides functions to create colormaps, access and modify colors
and<SP> color cells, and install colormaps in screen hardware.
<p1rule>
<Index, "color", "changing"><Index, "color", "creating">
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1para,
Font = F3,
Left Tab = -1.70/0 inches>
<F8>Color Functions<Tab><F6>9.2<F0><#04>A color is represented
by a CLX color object, in which each of the red,<SP>green, and blue
values is specified by an <F6>rgb<#1e>val<F0> <#1f> a floating point<SP>numbe
r between 0.0 and 1.0. (see paragraph 1.6, Data Types). The value
0.0<SP>represents the minimum intensity, while 1.0 represents the
maximum<SP>intensity. CLX automatically converts <F6>rgb<#1e>val<F0>
values into 16<#1e>bit integers<SP>when sending colors to an X server.
The X server, in turn, scales 16<#1e>bit<SP> color values to match
the actual intensity range supported by the screen.
<para>
<|,"9<#1e>100">Colors used on <F6>:gray<#1e>scale<F0> screens must have the
same value for each of red,<SP>green, and blue. Only one of these
values is used by screen hardware to<SP>determine intensity; however,
CLX does not define which of red, green, or<SP>blue is actually used.
The following paragraphs describe the CLX functions used to create,
access, and modify colors.
<syntax0>
make<#1e>color <F3>&key (<F0>:blue<F3> 1.0) (<F0>:green<F3> 1.0)
(<F0>:red<F3> 1.0) &allow<#1e>other<#1e>keys<F0><Tab><F3>Function<Index, Doc = operations, "xlib:make<#1e>color", Sort String = "make<#1e>color">
<return>
<Tab><F3>Returns: <F2><HR>
color <F3><#1f> Type <F0>color<F3>.
<para>
Creates, initializes, and returns a new <F6>color<F0> object with
the specified values for red, green, and blue.
<keyword2>
:blue<F3>, <F0>:green<F3>, <F0>:red <F3><#1f> <F0>rgb<#1e>val<F3>
values that specify the saturation for each primary.
<syntax0>
color<#1e>blue <F2>color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>blue", Sort String = "color<#1e>blue">
<return>
<Tab><F3>Returns: <F2><HR>
blue<#1e>intensity <F3><#1f> Type <F0>rgb<#1e>val<F3>.
<para>
Returns and (with <F6>setf<F0>) sets the value for blue in the <F2>color
<F0>.
<arg>
color <F3><#1f> A <F6>color<F3> object.
<syntax0>
color<#1e>green <F2>color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>green", Sort String = "color<#1e>green">
<return>
<Tab><F3>Returns: <F2><HR>
green<#1e>intensity <F3><#1f> Type <F0>rgb<#1e>val<F3>.
<para>
Returns and (with <F6>setf<F0>) sets the value for green in the <F2>color
<F0>.
<arg>
color <F3><#1f> A <F6>color<F3> object.
<syntax0>
color<#1e>p <F2>color<F0><Tab><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>p", Sort String = "color<#1e>p">
<return>
<Tab><F3>Returns: <F2><HR>
color<#1e>p <F3><#1f> Type <F0>boolean<F3>.
<para>
Returns non<#1e><F6>nil<F0> if the argument is a <F6>color<F0>
object and <F6>nil<F0> otherwise.
<syntax0>
color<#1e>red <F2>color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>red", Sort String = "color<#1e>red">
<return>
<Tab><F3>Returns: <F2><HR>
red<#1e>intensity <F3><#1f> Type <F0>rgb<#1e>val<F3>.
<para>
Returns and (with <F6>setf<F0>) sets the value for red in the <F2>color
<F0>.
<arg>
color <F3><#1f> A <F6>color<F3> object.
<syntax0>
color<#1e>rgb <F2>color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>rgb", Sort String = "color<#1e>rgb">
<return>
<Tab><F3>Returns: <F2><HR>
red<F3>,<F2> green<F3>,<F2> blue <F3><#1f> Type <F0>rgb<#1e>val<F3>.
<para>
Returns the values for red, green, and blue in the <F2>color<F0>.
<arg>
color <F3><#1f> A <F6>color<F3> object.
<p1rule,
New Page = yes>
<|,"9<#1e>101">
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1stacked,
Font = F3,
Left Tab = -1.70/0 inches>
<F8>Colormap <Tab><F6>9.3<F0><#04>A colormap is represented in
CLX by a <F6>colormap<F0> object. A CLX<FJ>
<p1para,
Font = F3,
Left Tab = -1.70/0 inches>
<F8>Functions<Tab><F0>program can create and manipulate several <F6>colormap
<F0> objects. However, the<SP>colors contained in a <F6>colormap<F0>
are made visible only when the <F6>colormap<F0> is<SP><F2>installed<F0>.
Each window is associated with a <F6>colormap<F0> that is used<SP>
to translate window pixels into colors (see <F6>window<#1e>colormap<F0>).
However, a<SP>window will appear in its true colors only if its associated
<F6>colormap<F0> is<SP> installed.
<para>
The total number of colormaps that can be installed depends on the
screen<SP>hardware. Most hardware devices allow exactly one <F6>colormap<F0>
to be installed<SP> at any time. That is, <F6>screen<#1e>min<#1e>installed<#1e>
maps<F0> and<SP> <F6>screen<#1e>max<#1e>installed<#1e>maps<F0>
are both equal to 1. Installing a new <F6>colormap<F0><SP> can cause
a previously installed <F6>colormap<F0> to be uninstalled. It is<SP>
important to remember that the set of installed <F6>colormaps<F0>
is a hardware<SP>resource shared cooperatively among all client programs
connected to an X<SP> server.
A CLX program can control the contents of <F6>colormaps<F0> by allocating
color<SP>cells in one of two ways: read<#1e>only or read<#1e>write.
Allocating a read<#1e>only<SP> color cell establishes a color value
for a specified pixel value that cannot<SP> be changed. However, read<#1e>only
color cells can be shared among all client<SP> programs. Read<#1e>only
allocation is the best strategy for making use of<SP>limited <F6>colormap
<F0> hardware in a multi<#1e>client environment.
Alternatively, allocating a read<#1e>write color cell allows a client
the<SP>exclusive right to set the color value stored in the cell.
A cell allocated<SP>read<#1e>write by one client cannot be allocated
by another client, not even as<SP> a read<#1e>only cell. Note that
read<#1e>write allocation is not allowed for<SP> screens whose visual
type belongs to one of the <F6>:static<#1e>gray<F0>, <F6>:static<#1e>color
<F0>, or<SP><F6>:true<#1e>color<F0> classes. For screens of these
classes, <F6>colormap<F0> cells cannot be<SP>modified.
Two entries of the default colormap, typically containing the colors
black and white, are automatically allocated read<#1e>only. The pixel
values for these entries can be returned by the functions <F6>screen<#1e>black
<#1e>pixel<F0> and <F6>screen<#1e>white<#1e>pixel<F0>. Applications
that need only two colors and also need to operate on both monochrome
and color screens should always use these pixel values. The names <F2>black
<F0> and <F2>white<F0> are intended to reflect relative intensity
levels and need not reflect the actual colors displayed for these
pixel values.
Each screen has a default <F6>colormap<F0>, which is initially installed.
By<SP> conventions, clients should allocate only read<#1e>only cells
from the default<SP> <F6>colormap<F0>.
<p2rule>
<Frame,
Name = p2rule,
Placement = At Anchor,
Width = 4.75 inches,
Height = 0.15 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p2stacked,
Font = F3>
<Index, "colormap", "creating", To Named = p2rule><Tab><F6>Creating<Tab>9.3.1<F0><#04>CLX provides
functions for creating and freeing new <F6>colormap<FJ>
<p2para,
Font = F3>
<Tab><F6>Colormaps<Tab><F0>objects.
<syntax0>
create<#1e>colormap <F2>visual window <F3>&optional<F2> alloc<#1e>p<F0><Tab>
<F3>Function<Index, Doc = operations, "xlib:create<#1e>colormap", Sort String = "create<#1e>colormap">
<return>
<Tab><F3>Returns: <F2><HR>
colormap <F3><#1f> Type <F0>colormap<F3>.
<para>
Creates and returns a <F2>colormap<F0> of the specified <F2>visual<F0>
type for the screen<SP>containing the <F2>window<F0>. The <F2>visual<F0>
type must be one of those supported by the screen.
Initial color cell values are undefined for visual types belonging
to the<SP> <F6>:gray<#1e>scale<F0>, <F6>:pseudo<#1e>color<F0>,
and <F6>:direct<#1e>color<F0> classes. Color cell values<SP>for
visual types belonging to the <F6>:static<#1e>gray<F0>, <F6>:static<#1e>colo
r<F0>, and<SP><F6>:true<#1e>color<F0> classes have initial values
defined by the visual type.<SP>However, X does not define the set
of possible visual types or their initial color cell values.
If <F2>alloc<#1e>p<F0> is true, all colormap cells are permanently
allocated<SP>read<#1e>write and cannot be freed by <F6>free<#1e>colors<F0>.
It is an error for <F2>alloc<#1e>p<F0><SP> to be true when the visual
type belongs to the <F6>:static<#1e>gray<F0>, <F6>:static<#1e>color<F0>,<SP>
or <F6>:true<#1e>color <F0>classes.
<arg>
<|,"9<#1e>102">visual <F3><#1f> A <F6>visual<F3> type ID.
window<F3> <#1f> A <F6>window<F3>.
alloc<#1e>p<F3> <#1f> Specifies whether <F6>colormap<F3> cells
are permanently allocated<SP>read<#1e>write.
<syntax0>
copy<#1e>colormap<#1e>and<#1e>free <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:copy<#1e>colormap<#1e>and<#1e>free", Sort String = "copy<#1e>colormap<#1e>and<#1e>free">
<return>
<Tab><F3>Returns: <F2><HR>
new<#1e>colormap <F3><#1f> Type <F0>colormap<F3>.
<para,
Bottom Margin = 0.12 inches>
Creates and returns a new <F6>colormap<F0> by copying, then freeing,
allocated cells<SP>from the specified <F2>colormap<F0>.
All color cells allocated read<#1e>only or read<#1e>write in the original
<F6>colormap<F0><SP>have the same color values and the same allocation
status in the <F2>new<#1e>colormap<F0>. The values of unallocated
color cells in the <F2>new<#1e>colormap<F0> are<SP>undefined. After
copying, all allocated color cells in the original<SP><F6>colormap<F0>
are freed, as if <F6>free<#1e>colors<F0> was called. The unallocated
cells of<SP> the original <F6>colormap<F0> are not affected.
If<F2> alloc<#1e>p<F0> was true when the original <F6>colormap<F0>
was created, then all color<SP>cells of the <F2>new<#1e>colormap<F0>
are permanently allocated read<#1e>write, and all the<SP> color cells
of the original <F6>colormap<F0> are freed.
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
free<#1e>colormap <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:free<#1e>colormap", Sort String = "free<#1e>colormap">
<para>
Destroys the <F2>colormap<F0> and frees its server resource. If
the <F2>colormap<F0> is<SP>installed, it is uninstalled. For any
window associated with the <F2>colormap<F0>,<SP>the window is assigned
a <F6>nil<F0> <F6>colormap<F0>, and a <F6>:colormap<#1e>notify<F0>
event is<SP> generated. The colors displayed for a window with a <F6>nil<F0>
<F6>colormap<F0> are<SP>undefined.
However, this function has no effect if the <F2>colormap<F0> is
a screen default<SP> <F6>colormap<F0>.
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
<p2rule>
<Frame,
Name = p2rule,
Placement = At Anchor,
Width = 4.75 inches,
Height = 0.15 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p2stacked,
Font = F3>
<Index, "colormap", "installing", To Named = p2rule><Tab><F6>Installing<Tab>9.3.2<F0><#04>The following
paragraphs describe the CLX functions to install and<FJ>
<p2para,
Font = F3>
<Tab><F6>Colormaps<Tab><F0>uninstall colormaps and to return the
set of installed colormaps.
<para>
Initially, the default <F6>colormap<F0> for a screen is installed
(but is not in the required list).
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
install<#1e>colormap <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:install<#1e>colormap", Sort String = "install<#1e>colormap">
<para>
Installs the <F2>colormap.<F0> All windows associated with this <F2>colormap
<F0> immediately display with true colors. As a side<#1e>effect,
additional colormaps might be implicitly uninstalled by the server.
If the specified <F2>colormap<F0> is not already installed, a <F6>:colormap<#1e>
notify<F0> event is generated on every window associated with this <F2>colorm
ap<F0>. In addition, for every other colormap that is implicitly
uninstalled, a <F6>:colormap<#1e>notify<F0> event is generated on
every associated window.
<arg>
colormap <F3><#1f> A <F6>colormap<F3>.
<syntax0>
installed<#1e>colormaps <F2>window<F3> &key (<F0>:result<#1e>type<F3>
<F0>'list<F3>)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:installed<#1e>colormaps", Sort String = "installed<#1e>colormaps">
<return>
<Tab><F3>Returns: <F2><HR>
colormap <F3><#1f> Type <F0>sequence<F3> of <F0>colormap<F3>.
<para>
Returns a sequence containing the installed <F6>colormaps<F0> for
the screen of the specified <F2>window<F0>. The order of the colormaps
is not significant.
<arg>
window <F3><#1f> A <F6>window<F3>.
<keyword2>
<|,"9<#1e>103">:result<#1e>type <F3><#1f> A sub<#1e>type of <F0>sequence <F3>that
<F0> <F3>indicates the type of sequence to return.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
uninstall<#1e>colormap <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:uninstall<#1e>colormap", Sort String = "uninstall<#1e>colormap">
<para>
Uninstalls the <F2>colormap<F0>. However, the <F2>colormap<F0>
is not actually uninstalled<SP>if this would reduce the set of installed
colormaps below the value of<SP> <F6>screen<#1e>min<#1e>installed<#1e>maps
<F0>. If the <F2>colormap<F0> is actually uninstalled, a<SP><F6>:colormap<#1e>
notify<F0> event is generated on every associated window.
<arg>
colormap <F3><#1f> A <F6>colormap<F3>.
<p2rule>
<Frame,
Name = p2rule,
Placement = At Anchor,
Width = 4.75 inches,
Height = 0.15 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p2para,
Font = F3>
<Index, "color", "allocating", To Named = p2rule><Tab><F6>Allocating Colors<Tab>9.3.3<#04><F0>The
following paragraphs describe the functions for allocating read<#1e>only
and read<#1e>write color cells, allocating color planes, and freeing
color cells.
<syntax0>
alloc<#1e>color <F2>colormap color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:alloc<#1e>color", Sort String = "alloc<#1e>color">
<return>
<Tab><F3>Returns: <F2><HR>
pixel<F3> <#1f> Type <F0>pixel<F3>.<HR>
<F2>screen<#1e>color<F3>,<F2> exact<#1e>color <F3><#1f> Type <F0>color
<F3>.
<para>
Returns a <F2>pixel<F0> for a read<#1e>only color cell in the <F2>colormap
<F0>. The color in the allocated cell is the closest approximation
to the<SP>requested <F2>color<F0> possible for the screen hardware.
The other<SP>values returned give both the approximate color stored
in the cell and the exact color requested.
The requested <F2>color<F0> can be either a <F6>color<F0> object
or a <F6>stringable<F0><SP>containing a color name. If a color name
is given, a corresponding<SP>color value is looked up (see <F6>lookup<#1e>colo
r<F0>) and used. Color name<SP>strings must contain only ISO Latin<#1e>1
characters; case is not<SP>significant.
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
color<F3> <#1f> A <F6>color<F3> object or a <F6>stringable<F3>
containing a color name.
<syntax0>
alloc<#1e>color<#1e>cells <F2>colormap colors<F3> &key (<F0>:planes<F3>
0) <F0>:contiguous<#1e>p<F3> <F0><Tab><F3>Function<Index, Doc = operations, "xlib:alloc<#1e>color<#1e>cells", Sort String = "alloc<#1e>color<#1e>cells"><HR>
(<F0>:result<#1e>type<F3> <F0>'list<F3>)
<return>
<Tab><F3>Returns: <F2><HR>
pixels, mask <F3><#1f> Type <F0>sequence<F3> of <F0>pixels<F3>.
<para>
Returns a <F6>sequence<F0> of <F2>pixels<F0> for read<#1e>write
color cells in the <F2>colormap<F0>.<SP> The allocated cells contain
undefined color values. The visual type<SP>class of the <F6>colormap<F0>
must be either <F6>:gray<#1e>scale<F0>, <F6>:pseudo<#1e>color<F0>,<SP>or
<F6>:direct<#1e>color<F0>.
The <F2>colors<F0> argument and the <F6>:planes<F0> argument define
the number of pixels<SP>and the number of masks returned, respectively.
The number of colors<SP>must be positive, and the number of planes
must be non<#1e>negative. A<SP>total of (* <F2>colors<F0> (<F6>expt<F0>
2 <F2>planes<F0>)) color cells are allocated. The pixel<SP>values
for the allocated cells can be computed by combining the returned<SP>pixels
and masks.
The length of the returned masks sequence is equal to <F6>:planes<F0>.
Each mask<SP>of the returned masks sequence defines a single bitplane.
None of the<SP> masks have any 1 bits in common. Thus, by selectively
combining masks<SP>with <F6>logior<F0>, (<F6>expt<F0> 2 <F2>planes<F0>)
distinct combined plane masks can be<SP> computed.
The length of the returned <F2>pixels<F0> sequence is equal to <F2>colors
<F0>. None of<SP> the pixels have any 1 bits in common with each
other or with any of the<SP>returned masks. By combining pixels and
plane masks with <F6>logior<F0>, (*<SP><F2>colors<F0> (<F6>expt<F0>
2 <F2>planes<F0>)) distinct pixel values can be produced.
<|,"9<#1e>104">If the <F2>colormap<F0> class is <F6>:gray<#1e>scale<F0>
or <F6>:pseudo<#1e>color<F0>, each <F2>mask<F0><SP>will have exactly
one bit set. If the <F6>colormap<F0> class is <F6>:direct<#1e>color<F0>,<SP>
each <F2>mask<F0> will have exactly three bits set. If <F6>:contiguous<#1e>p
<F0> is<SP>true, combining all masks with <F6>logior<F0> produces
a plane mask<SP>with either one set of contiguous bits (for <F6>:gray<#1e>scal
e<F0> and<SP><F6>:pseudo<#1e>color<F0>) or three sets of contiguous
bits (for <F6>:direct<#1e>color<F0>).
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
colors<F3> <#1f> A positive number defining the length of the pixels<SP>sequen
ce returned.
<F6>:planes<F3> <#1f> A non<#1e>negative number defining the length
of the masks<SP>sequence returned.
<F6>:contiguous<#1e>p<F3> <#1f> If true, the masks form contiguous
sets of bits.
<F6>:result<#1e>type<F3> <#1f> A subtype of <F6>sequence<F3> that
indicates the type of<SP>sequences returned.
<syntax0>
alloc<#1e>color<#1e>planes <F2>colormap colors <F3>&key (<F0>:reds<F3>
0) (<F0>:greens<F3> 0) (<F0>:blues<F3> 0) <F0><Tab><F3>Function<Index, Doc = operations, "xlib:alloc<#1e>color<#1e>planes", Sort String = "alloc<#1e>color<#1e>planes"><HR>
<F0>:contiguous<#1e>p<F3> (:<F0>result<#1e>type<F3> <F0>'list<F3>)
<return>
<Tab><F3>Returns: <HR>
<F2>pixels <F3><#1f> Type <F0>sequence<F3> of <F0>pixel<F3>. <HR>
<F2>red<#1e>mask<F3>, <F2>green<#1e>mask<F3>, <F2>blue<#1e>mask <F3><#1f>
Type <F0>pixel<F3>.
<para>
Returns a <F6>sequence<F0> of <F2>pixels<F0> for read<#1e>write
color cells in the <F2>colormap<F0>.<SP> The allocated cells contain
undefined color values. The visual type<SP>class of the <F2>colormap<F0>
must be either <F6>:gray<#1e>scale<F0>, <F6>:pseudo<#1e>color<F0>,<SP>or
<F6>:direct<#1e>color<F0>.
The <F2>colors<F0> argument defines the number of pixels returned.
The <F6>:reds<F0>,<SP><F6>:greens<F0>, and <F6>:blues<F0> arguments
define the number of bits set in the<SP>returned red, green, and blue
masks, respectively. The number of colors<SP>must be positive, and
the number of bits for each mask must be<SP>non<#1e>negative. A total
of (* <F2>colors<F0> (<F6>expt<F0> 2 (+ <F2>reds greens blues<F0>)))<SP>c
olor cells are allocated. The pixel values for the allocated cells
can<SP>be computed by combining the returned <F2>pixels<F0> and
masks.
Each mask of the returned masks defines a pixel subfield for the corresponding
primary. None of the masks have any 1 bits in common. By<SP>selectively
combining subsets of the red, green, and blue masks with<SP><F6>logior<F0>,
(<F6>expt<F0> 2<FJ>
(+ <F2>reds greens blues<F0>) distinct combined plane masks can<SP>be
computed.
The length of the returned <F2>pixels<F6> sequence<F0> is equal
to <F2>colors<F0>. None of<SP>the pixels have any 1 bits in common
with each other or with any of the<SP>returned masks. By combining
pixels and plane masks with <F6>logior<F0>, (*<SP><F2>colors<F0>
(<F6>expt<F0> 2 (+ <F2>reds greens blues<F0>)) distinct pixel
values can be<SP>produced.
If <F6>:contiguous<#1e>p<F0> is true, each of returned masks consists
of a set<SP>of contiguous bits. If the <F6>colormap<F0> class is <F6>:direct
<#1e>color<F0>, each<SP>returned mask lies within the pixel subfield
for its primary.
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
colors <F3><#1f> A positive number defining the length of the pixels<SP>sequen
ce returned.
<F6>:planes<F3> <#1f> A non<#1e>negative number defining the length
of the masks<SP> sequence returned.
<F6>:contiguous<#1e>p<F3> <#1f> If true, then the masks form contiguous
sets of bits.
<F6>:result<#1e>type<F3> <#1f> A subtype of <F6>sequence<F3> that
indicates the type of<SP> sequences returned.<SP><F0>
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
free<#1e>colors <F2>colormap pixels <F3>&optional (<F2>plane<#1e>mask<F3>
0)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:free<#1e>colors", Sort String = "free<#1e>colors">
<para>
Frees a set of allocated color cells from the <F2>colormap<F0>.
The pixel<SP>values for the freed cells are computed by combining
the given <F2>pixels<F0><SP>sequence and <F6>:plane<#1e>mask<F0>.
The total number of cells freed is:
<|,"9<#1e>105">(* (<F6>length<F2><SP> pixels<F0>) (<F6>expt<F0> 2 (<F6>logcount
<F0> <F2>plane<#1e>mask<F0>)))
The <F6>:plane<#1e>mask<F0> must not have any bits in common with
any of the given<SP><F2>pixels<F0>. The pixel values for the freed
cells are produced by using<SP><F6>logior<F0> to combine each of
the given pixels with all subsets of the<SP><F6>:plane<#1e>mask<F0>.
Note that freeing an individual pixel allocated by <F6>alloc<#1e>color<#1e>pla
nes<F0><SP>may not allow it to be reused until all related pixels
computed from the<SP>same plane mask are also freed.
A single error is generated if any computed pixel is invalid or if
its<SP>color cell is not allocated by the client. Even if an error
is<SP>generated, all valid pixel values are freed.
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
pixels<F3> <#1f> A <F6>sequence<F3> of pixel values.
plane<#1e>mask<F3> <#1f> A pixel value with no bits in common with
any of the <F0>pixels<F3>.
<p2rule>
<Frame,
Name = p2rule,
Placement = At Anchor,
Width = 4.75 inches,
Height = 0.15 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p2para,
Font = F3>
<Index, "color", "finding", To Named = p2rule><Tab><F6>Finding Colors<Tab>9.3.4<#04><F0>A
CLX program can ask the X server to return the colors stored in<SP>allocated
color cells. The server also maintains a dictionary of color<SP>names
and their associated color values. CLX provides a function to<SP>
look up the values for common colors by names such as <#7f>red", <#7f>purple",<SP>
and so forth. The following paragraphs describe the CLX functions
for returning the color<SP>values associated with color cells or with
color names.
<syntax0>
lookup<#1e>color <F2>colormap name<F0><Tab><F3>Function<Index, Doc = operations, "xlib:lookup<#1e>color", Sort String = "lookup<#1e>color">
<return>
<Tab><F3>Returns: <F2><HR>
screen<#1e>color<F3>,<F2> exact<#1e>color <F3><#1f> Type <F0>color<F3>.
<para>
Returns the color associated by the X server with the given color <F2>name
<F0>.<SP> The <F2>name<F0> must contain only ISO Latin<#1e>1 characters;
case is not<SP>significant. The first value returned is the closest
approximation to<SP>the requested color possible on the screen hardware.
The second value<SP>returned is the true color value for the requested
color.
<arg>
colormap <F3><#1f> A <F6>colormap<F3>.
name <F3><#1f> A <F6>stringable<F3> color name.
<syntax0>
query<#1e>colors <F2>colormap pixels<F3> &key (<F0>:result<#1e>type<F3>
<F0>'list<F3>)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:query<#1e>colors", Sort String = "query<#1e>colors">
<return>
<Tab><F3>Returns: <F2><HR>
colors <F3><#1f> Type <F0>sequence<F3> of <F0>color<F3>.
<para>
Returns a <F6>sequence<F0> of the colors contained in the allocated
cells of the<SP><F2>colormap<F0> specified by the given <F2>pixels<F0>.
The values returned for<SP>unallocated cells are undefined.
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
pixels<F3> <#1f> A <F6>sequence<F3> of <F6>pixel<F3> values.
<F6>:result<#1e>type<F3> <#1f> A subtype of <F6>sequence<F3> that
indicates the type of<SP> sequences returned.
<p2rule>
<Frame,
Name = p2rule,
Placement = At Anchor,
Width = 4.75 inches,
Height = 0.15 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p2para,
Font = F3>
<Index, "color", "changing", To Named = p2rule><Tab><F6>Changing Colors<Tab>9.3.5<#04><F0>The
following paragraphs describe the CLX functions to change the colors
in<SP> colormap cells.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
store<#1e>color <F2>colormap pixel color<F3> &key (<F0>:red<#1e>p<F3>
<F0>t<F3>) (<F0>:green<#1e>p<F3> <F0>t<F3>) (<F0>:blue<#1e>p<F3> <F0>t
<F3>)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:store<#1e>color", Sort String = "store<#1e>color">
<para>
Changes the contents of the <F2>colormap<F0> cell indexed by the <F2>pixel
<F0>. Components of the given <F2>color<F0> are stored in the cell.
The <F6>:red<#1e>p<F0>, <F6>:green<#1e>p<F0>, and <F6>:blue<#1e>p<F0>
arguments indicate which components of the given<SP><F2>color<F0>
are stored.
<|,"9<#1e>106">The <F2>color<F0> can be either a <F6>color<F0> object or
a <F6>stringable<F0> containing a<SP>color name. If a color name
is given, a corresponding color value is<SP>looked up (see <F6>lookup<#1e>colo
r<F0>) and used. Color name strings must contain<SP> only ISO Latin<#1e>1
characters; case is not significant.
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
pixel<F3> <#1f> A <F6>pixel<F3>.
color<F3> <#1f> A color <F6>object<F3> or a <F6>stringable<F3>
containing a color name.
<F6>:red<#1e>p<F3>, <F6>:green<#1e>p<F3>, <F6>:blue<#1e>p<F3><SP><#1f>
<F6>boolean<F3> values indicating which color components to store.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
store<#1e>colors <F2>colormap pixel<#1e>colors <F3>&key (<F0>:red<#1e>p
<F3> <F0>t<F3>) (<F0>:green<#1e>p<F3> <F0>t<F3>) (<F0>:blue<#1e>p<F3>
<F0>t<F3>)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:store<#1e>colors", Sort String = "store<#1e>colors">
<para>
Changes the contents of multiple <F2>colormap<F0> cells. <F2>pixel<#1e>color
s<F0> is a list<SP> of the form ({<F2>pixel color<F0>}*), indicating
a set of pixel values and the colors to store in the corresponding
cells. The <F6>:red<#1e>p<F0>, <F6>:green<#1e>p<F0>, and<SP><F6>:blue<#1e>
p<F0> arguments indicate which components of the given colors are<SP>stored.
Each color can be either a <F6>color<F0> object or a <F6>stringable<F0>
containing a<SP>color name. If a color name is given, a corresponding
color value is<SP>looked up (see <F6>lookup<#1e>color<F0>) and used.
Color name strings must contain<SP>only ISO Latin<#1e>1 characters;
case is not significant.
<arg>
colormap<F3> <#1f> A <F6>colormap<F3>.
pixel<#1e>colors <F3><#1f> A list of the form ({<F0>pixel color<F3>}*).
<F6>:red<#1e>p<F3>, <F6>:green<#1e>p<F3>, <F6>:blue<#1e>p<F3><SP><#1f>
<F6>boolean<F3> values indicating which color components to store.
<p2rule,
New Page = yes>
<|,"9<#1e>107">
<Frame,
Name = p2rule,
Placement = At Anchor,
Width = 4.75 inches,
Height = 0.15 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p2stacked,
Font = F3>
<Index, "colormap", "accessors"><Tab><F6>Colormap<Tab>9.3.6<#04><F0>The complete
set of colormap attributes is discussed in the following<FJ>
<p2para,
Font = F3>
<Tab><F6>Attributes<Tab><F0>paragraphs.
<syntax0>
colormap<#1e>display<F3> <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:colormap<#1e>display", Sort String = "colormap<#1e>display">
<return>
<Tab><F3>Returns: <F2><HR>
display <F3><#1f> Type <F0>display<F3>.
<para>
Returns the <F6>display<F0> object associated with the specified <F2>colorma
p<F0>.
<arg>
colormap <#1f> <F3>A <F6>colormap<F3>.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
colormap<#1e>equal <F2>colormap<#1e>1<F3> <F2>colormap<#1e>2<F0><Tab><F3>F
unction<Index, Doc = operations, "xlib:colormap<#1e>equal", Sort String = "colormap<#1e>equal">
<para>
Returns true if the two arguments refer to the same server resource
and <F6>nil<F0> if they do not.
<arg>
colormap<#1e>1<F3>, <F0>colormap<#1e>2 <F3><#1f> A <F6>colormap<F3>.
<syntax0>
colormap<#1e>id <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:colormap<#1e>id", Sort String = "colormap<#1e>id">
<return>
<Tab><F3>Returns: <F2><HR>
id <F3><#1f> Type <F0>resource<#1e>id<F3>.
<para>
Returns the unique ID assigned to the specified <F2>colormap<F0>.
<arg>
colormap <F3><#1f> A <F6>colormap<F3>.
<syntax0>
colormap<#1e>p <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:colormap<#1e>p", Sort String = "colormap<#1e>p">
<return>
<Tab><F3>Returns: <F2><HR>
map<#1e>p <F3><#1f> Type <F0>boolean<F3>.
<para>
Returns non<#1e><F6>nil<F0> if the argument is a <F6>colormap<F0>
and <F6>nil<F0> otherwise.
<syntax0>
colormap<#1e>plist <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:colormap<#1e>plist", Sort String = "colormap<#1e>plist">
<return>
<Tab><F3>Returns: <F2><HR>
colormap<#1e>p <F3><#1f> Type <F0>boolean<F3>.<F2>
<para>
Returns and (with <F6>setf<F0>) sets the property list for the specified
<F2>colormap<F0>. This function provides a hook where extensions
can add data.
<arg>
colormap <F3><#1f> A <F6>colormap<F3>.
<newpage>
<|,"9<#1e>108">