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:
Interleaf document  |  1989-10-18  |  43.6 KB  |  1,466 lines

  1. <!OPS, Version = 5.2>
  2.  
  3. <!Document,
  4.     Print Rev Bars =    no,
  5.     Final Output Device =    "ps",
  6.     Default Printer =    "nearest-adps">
  7.  
  8. <!Font Definitions,
  9.     F2 = Times 10 Italic,
  10.     F3 = Times 10,
  11.     F4 = Times 8 Italic,
  12.     F5 = Times 18 Bold,
  13.     F6 = Times 10 Bold,
  14.     F7 = Times 18,
  15.     F8 = Times 12 Bold,
  16.     F9 = Symbol_B 8>
  17.  
  18. <!Page,
  19.     Bottom Margin =        1 inches,
  20.     Left Margin =        1 inches,
  21.     Right Margin =        1.15 inches,
  22.     First Page =        Right,
  23.     Starting Page # =     Inherit,
  24.     Page # Prefix =        "9<#1e>",
  25.     Hyphenation =        on,
  26.     Consecutive Hyphens =    2,
  27.     Vert. Just. =        off>
  28.  
  29. <!Autonumber Stream, List, 2,
  30.     Level 2 Suffix =    ,
  31.     Level 2 Starting Value = 0,
  32.     Level 2 Show =        no>
  33.  
  34. <!Autonumber Stream, Outline, 3,
  35.     Level 1 Symbol Type =    UPPER ROMAN,
  36.     Level 2 Symbol Type =    UPPER ALPHA>
  37.  
  38. <!Autonumber Stream, figure, 2,
  39.     Level 1 Prefix =    "Figure ",
  40.     Level 1 Suffix =    "<#1e>",
  41.     Level 1 Show =        no,
  42.     Level 2 Suffix =    ,
  43.     Level 2 Starting Value = 0,
  44.     Level 2 Show =        no>
  45.  
  46. <!Autonumber Stream, figurelet, 2,
  47.     Level 1 Symbol Type =    UPPER ALPHA,
  48.     Level 1 Prefix =    "Figure ",
  49.     Level 1 Suffix =    "<#1e>",
  50.     Level 1 Show =        no,
  51.     Level 2 Suffix =    "<#04>">
  52.  
  53. <!Autonumber Stream, invisible, 1,
  54.     Level 1 Suffix =    ,
  55.     Level 1 Show =        no>
  56.  
  57. <!Autonumber Stream, item, 2,
  58.     Level 2 Symbol Type =    LOWER ALPHA,
  59.     Level 2 Trail =        yes>
  60.  
  61. <!Autonumber Stream, paralet, 4,
  62.     Level 1 Symbol Type =    UPPER ALPHA,
  63.     Level 1 Suffix =    ,
  64.     Level 1 Show =        no,
  65.     Level 2 Prefix =    .,
  66.     Level 2 Suffix =    ,
  67.     Level 3 Prefix =    .,
  68.     Level 3 Suffix =    ,
  69.     Level 4 Prefix =    .,
  70.     Level 4 Suffix =    >
  71.  
  72. <!Autonumber Stream, paranum, 4,
  73.     Level 1 Suffix =    ,
  74.     Level 1 Show =        no,
  75.     Level 2 Prefix =    .,
  76.     Level 2 Suffix =    ,
  77.     Level 3 Prefix =    .,
  78.     Level 3 Suffix =    ,
  79.     Level 4 Prefix =    .,
  80.     Level 4 Suffix =    >
  81.  
  82. <!Autonumber Stream, table, 2,
  83.     Level 1 Prefix =    "Table ",
  84.     Level 1 Suffix =    "<#1e>",
  85.     Level 1 Show =        no,
  86.     Level 2 Suffix =    >
  87.  
  88. <!Autonumber Stream, tablelet, 2,
  89.     Level 1 Symbol Type =    UPPER ALPHA,
  90.     Level 1 Prefix =    "Table ",
  91.     Level 1 Suffix =    "<#1e>",
  92.     Level 1 Show =        no,
  93.     Level 2 Suffix =    "<#04>">
  94.  
  95. <!Class, arg,
  96.     Bottom Margin =        0.08 inches,
  97.     Left Margin =        1.85 inches,
  98.     First Indent =        -0.25 inches,
  99.     Line Spacing =        1.121 lines,
  100.     Font =            F2,
  101.     Left Tab =        -0.25/0 inches>
  102.  
  103. <!Class, bullet,
  104.     Bottom Margin =        0.153 inches,
  105.     Left Margin =        1.85 inches,
  106.     First Indent =        -0.25 inches,
  107.     Line Spacing =        1.121 lines,
  108.     Font =            F3,
  109.     Allow Page Break Within = no,
  110.     Left Tab =        -0.50/0 inches>
  111.  
  112. <!Class, caption,
  113.     Top Margin =        0.07 inches,
  114.     Bottom Margin =        0.07 inches,
  115.     Line Spacing =        1.100 lines,
  116.     Font =            F4>
  117.  
  118. <!Class, fig,
  119.     Top Margin =        0.07 inches,
  120.     Bottom Margin =        0.07 inches,
  121.     Line Spacing =        1.100 lines,
  122.     Alignment =        Left,
  123.     Font =            F5>
  124.  
  125. <!Class, keyword2,
  126.     Bottom Margin =        0.153 inches,
  127.     Left Margin =        1.85 inches,
  128.     First Indent =        -0.25 inches,
  129.     Line Spacing =        1.121 lines,
  130.     Font =            F6,
  131.     Left Tab =        -0.50/0 inches>
  132.  
  133. <!Class, newpage,
  134.     Bottom Margin =        0 inches,
  135.     Line Spacing =        1 lines,
  136.     Alignment =        Left,
  137.     Font =            F7,
  138.     Hyphenation =        off,
  139.     New Page =        yes,
  140.     Left Tab =        >
  141.  
  142. <!Class, p1para,
  143.     Bottom Margin =        0.153 inches,
  144.     Left Margin =        1.60 inches,
  145.     First Indent =        -1.60 inches,
  146.     Line Spacing =        1.121 lines,
  147.     Font =            F6,
  148.     Allow Page Break Within = no,
  149.     Left Tab =        -1.60/-0.17/0 inches>
  150.  
  151. <!Class, p1rule,
  152.     Bottom Margin =        0 inches,
  153.     Line Spacing =        1 lines,
  154.     Font =            F3,
  155.     Hyphenation =        off,
  156.     Allow Page Break After = no,
  157.     Left Tab =        0/0.75*13 inches>
  158.  
  159. <!Class, p1stacked,
  160.     Bottom Margin =        0 inches,
  161.     Left Margin =        1.60 inches,
  162.     First Indent =        -1.60 inches,
  163.     Line Spacing =        1 lines,
  164.     Font =            F6,
  165.     Allow Page Break Within = no,
  166.     Allow Page Break After = no,
  167.     Left Tab =        -1.60/-0.17/0 inches>
  168.  
  169. <!Class, p2para,
  170.     Bottom Margin =        0.153 inches,
  171.     Left Margin =        1.60 inches,
  172.     First Indent =        -1.60 inches,
  173.     Line Spacing =        1.121 lines,
  174.     Font =            F6,
  175.     Left Tab =        0 inches,
  176.     Right Tab =        -1.60/-0.17 inches>
  177.  
  178. <!Class, p2rule,
  179.     Bottom Margin =        0 inches,
  180.     Left Margin =        1.60 inches,
  181.     Line Spacing =        1 lines,
  182.     Alignment =        Left,
  183.     Font =            F3,
  184.     Hyphenation =        off,
  185.     Allow Page Break After = no,
  186.     Left Tab =        0/0.75*13 inches>
  187.  
  188. <!Class, p2stacked,
  189.     Bottom Margin =        0 inches,
  190.     Left Margin =        1.60 inches,
  191.     First Indent =        -1.60 inches,
  192.     Line Spacing =        1.121 lines,
  193.     Font =            F6,
  194.     Allow Page Break Within = no,
  195.     Allow Page Break After = no,
  196.     Left Tab =        0 inches,
  197.     Right Tab =        -1.60/-0.17 inches>
  198.  
  199. <!Class, para,
  200.     Bottom Margin =        0.153 inches,
  201.     Left Margin =        1.60 inches,
  202.     Line Spacing =        1.121 lines,
  203.     Font =            F3,
  204.     Allow Page Break Within = no,
  205.     Left Tab =        0/0.75*13 inches>
  206.  
  207. <!Class, return,
  208.     Bottom Margin =        0.077 inches,
  209.     Left Margin =        1.60 inches,
  210.     First Indent =        -0.90 inches,
  211.     Line Spacing =        1.121 lines,
  212.     Alignment =        Left,
  213.     Font =            F6,
  214.     Hyphenation =        off,
  215.     Allow Page Break Within = no,
  216.     Allow Page Break After = no,
  217.     Left Tab =        -0.90/0 inches,
  218.     Right Tab =        7.50 inches>
  219.  
  220. <!Class, secno,
  221.     Top Margin =        0.07 inches,
  222.     Bottom Margin =        0.07 inches,
  223.     Line Spacing =        1.100 lines,
  224.     Alignment =        Left,
  225.     Font =            F5,
  226.     Autonumber Name =    paranum>
  227.  
  228. <!Class, secrule,
  229.     Bottom Margin =        0 inches,
  230.     Line Spacing =        1 lines,
  231.     Font =            F3,
  232.     Hyphenation =        off,
  233.     Allow Page Break After = no,
  234.     Left Tab =        0/0.75*13 inches,
  235.     Autonumber Name =    table>
  236.  
  237. <!Class, sectitle,
  238.     Bottom Margin =        0 inches,
  239.     Line Spacing =        1 lines,
  240.     Alignment =        Right,
  241.     Font =            F5,
  242.     Hyphenation =        off,
  243.     New Page =        yes,
  244.     Left Tab =        0/0.75*13 inches>
  245.  
  246. <!Class, syntax,
  247.     Bottom Margin =        0.077 inches,
  248.     Left Margin =        1.60 inches,
  249.     First Indent =        -0.90 inches,
  250.     Line Spacing =        1.121 lines,
  251.     Alignment =        Left,
  252.     Font =            F6,
  253.     Hyphenation =        off,
  254.     Allow Page Break Within = no,
  255.     Allow Page Break After = no,
  256.     Left Tab =        -0.90/0 inches,
  257.     Right Tab =        8 inches>
  258.  
  259. <!Class, syntax0,
  260.     Bottom Margin =        0 inches,
  261.     Left Margin =        1.60 inches,
  262.     First Indent =        -0.90 inches,
  263.     Line Spacing =        1.121 lines,
  264.     Alignment =        Left,
  265.     Font =            F6,
  266.     Hyphenation =        off,
  267.     Allow Page Break Within = no,
  268.     Allow Page Break After = no,
  269.     Left Tab =        -0.90/0 inches,
  270.     Right Tab =        8 inches>
  271.  
  272. <!Class, "table",
  273.     Top Margin =        0.07 inches,
  274.     Bottom Margin =        0.07 inches,
  275.     Line Spacing =        1.100 lines,
  276.     Font =            F6,
  277.     Autonumber Name =    table>
  278.  
  279. <!Class, title,
  280.     Top Margin =        0.07 inches,
  281.     Bottom Margin =        0.07 inches,
  282.     Line Spacing =        1.100 lines,
  283.     Alignment =        Right,
  284.     Font =            F5,
  285.     TOC Doc Name =        TOC>
  286.  
  287. <!Master Frame,
  288.     Name =            "At Anchor",
  289.     Placement =        At Anchor,
  290.     Width =            0.41 inches,
  291.     Height =        0.137 inches,
  292.     Vertical Alignment =    0.03 inches,
  293.     Diagram =
  294. V4,
  295. (g9,32767,0
  296.  (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
  297.   667,6))>
  298.  
  299. <!Master Frame,
  300.     Name =            p1rule,
  301.     Placement =        At Anchor,
  302.     Width =            6.35 inches,
  303.     Height =        0.153 inches,
  304.     Vertical Alignment =    0.007 inches,
  305.     Shared Contents =    yes,
  306.     Diagram =
  307. V4,
  308. (g9,1,0
  309.  (v4,1,0,0.006667,0.066723,6.326667,0.066611,17,2,0)
  310.  (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
  311.   667,6))>
  312.  
  313. <!Master Frame,
  314.     Name =            p2rule,
  315.     Placement =        At Anchor,
  316.     Width =            4.75 inches,
  317.     Height =        0.15 inches,
  318.     Vertical Alignment =    0.007 inches,
  319.     Shared Contents =    yes,
  320.     Diagram =
  321. V4,
  322. (g9,1,0
  323.  (v4,1,0,4.733333,0.066611,0.006667,0.066723,17,2,0)
  324.  (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
  325.   667,6))>
  326.  
  327. <First Page Header, Frame =
  328. V4,
  329. (g9,0,0
  330.  (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
  331.   667,6))>
  332.  
  333. <Right Page Header, Frame =
  334. V4,
  335. (g9,1,0
  336.  (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
  337.   ,512,102,1101,2,
  338. <caption>
  339.  
  340.                            Colors
  341.  
  342. <End Text>)
  343.  (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
  344.   667,6))>
  345.  
  346. <Left Page Header, Frame =
  347. V4,
  348. (g9,1,0
  349.  (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
  350.   2,1101,2,
  351. <caption>
  352.  
  353. Colors
  354.  
  355. <End Text>)
  356.  (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
  357.   667,6))>
  358.  
  359. <Right Page Footer, Frame =
  360. V4,
  361. (g9,1,0
  362.  (t8,1,4,6.333333,0.266667,2,17,@nntimsps10b,\240)
  363.  (t8,2,4,0.006667,0.266667,0,17,@nntimsps8i,CLX\ Programmer's\ Reference)
  364.  (v4,3,0,0,0.066667,6.333333,0.066554,17,2,0)
  365.  (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
  366.   667,6))>
  367.  
  368. <Left Page Footer, Frame =
  369. V4,
  370. (g9,1,0
  371.  (t8,1,4,0,0.266667,0,17,@nntimsps10b,\240)
  372.  (t8,2,4,6.333333,0.266667,2,17,@nntimsps8i,CLX\ Programmer's\ Reference)
  373.  (v4,3,0,0.026667,0.066667,6.333333,0.066554,17,2,0)
  374.  (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
  375.   667,6))>
  376.  
  377. <sectitle,
  378.     Allow Page Break Within = no,
  379.     Allow Page Break After = no>
  380.  
  381. <|,"9<#1e>99">
  382. <Frame,
  383.     Name =            "At Anchor",
  384.     Placement =        At Anchor,
  385.     Width =            4.72 inches,
  386.     Height =        0.94 inches,
  387.     Vertical Alignment =    0.03 inches,
  388.     Diagram =
  389. V4,
  390. (g9,1,0
  391.  (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
  392.   ,102,1101,3,
  393. <title>
  394.  
  395. COLORS
  396.  
  397. <End Text>)
  398.  (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
  399.   667,6))>
  400. <Frame,
  401.     Name =            "At Anchor",
  402.     Placement =        At Anchor,
  403.     Width =            1.626 inches,
  404.     Height =        0.938 inches,
  405.     Vertical Alignment =    0 inches,
  406.     Diagram =
  407. V4,
  408. (g9,1,0
  409.  (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
  410.   2,1101,3,
  411. <secno,
  412.     TOC Doc Name =        TOC>
  413.  
  414. <Autonum, paranum, 1, First = Yes>
  415.  
  416. <End Text>)
  417.  (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
  418.   2,1101,3,
  419. <"table">
  420.  
  421. <Autonum, table, 1, First = Yes>
  422.  
  423. <End Text>)
  424.  (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
  425.   1,3,
  426. <fig,
  427.     Alignment =        Both,
  428.     Font =            F6,
  429.     Autonumber Name =    figure>
  430.  
  431. <Autonum, figure, 1, First = Yes>
  432.  
  433. <End Text>)
  434.  (g9,5,0
  435.    (p7,5,8,19
  436.      (g9,5,0
  437.        (g9,5,0
  438.          (v4,5,0,0.266667,0,1.6,0,17,1,0)
  439.          (v4,6,0,1.6,0,1.6,0.933333,17,1,0)
  440.          (v4,7,0,1.6,0.933333,0.266667,0.933333,17,1,0)
  441.          (v4,8,0,0.266667,0.933333,0.266667,0,17,1,0))))
  442.    (g9,10,8
  443.      (g9,10,1032
  444.        (p7,10,8,13
  445.          (g9,10,0
  446.            (g9,10,0
  447.              (v4,10,0,1.268771,0.615801,1.021755,0.615801,17,1,0)
  448.              (v4,11,0,1.021755,0.615801,0.887018,0.503208,17,1,0)
  449.              (v4,12,0,0.887018,0.503208,0.887018,0.259257,17,1,0)
  450.              (v4,13,0,0.887018,0.259257,1.021755,0.146666,17,1,0)
  451.              (v4,14,0,1.021755,0.146666,1.33614,0.146666,17,1,0)
  452.              (v4,15,32,1.33614,0.146666,1.268771,0.296785,17,0,0)
  453.              (v4,16,0,1.268771,0.296785,1.089124,0.296785,17,1,0)
  454.              (v4,17,0,1.089124,0.296785,1.089124,0.465677,17,1,0)
  455.              (v4,18,0,1.089124,0.465677,1.268771,0.465677,17,1,0)
  456.              (v4,19,32,1.268771,0.465677,1.268771,0.615801,17,0,0))))
  457.        (p7,21,8,13
  458.          (g9,21,0
  459.            (g9,21,0
  460.              (v4,21,0,1.33614,0.934816,1.021755,0.934816,17,1,0)
  461.              (v4,22,0,1.021755,0.934816,0.887018,0.822221,17,1,0)
  462.              (v4,23,0,0.887018,0.822221,0.887018,0.709628,17,1,0)
  463.              (v4,24,0,0.887018,0.709628,1.089124,0.709628,17,1,0)
  464.              (v4,25,0,1.089124,0.709628,1.089124,0.784692,17,1,0)
  465.              (v4,26,0,1.089124,0.784692,1.268771,0.784692,17,1,0)
  466.              (v4,27,0,1.268771,0.784692,1.268771,0.615801,17,1,0)
  467.              (v4,28,32,1.268771,0.615801,1.268771,0.465677,17,0,0)
  468.              (v4,29,0,1.268771,0.465677,1.268771,0.296785,17,1,0)
  469.              (v4,30,32,1.268771,0.296785,1.33614,0.146666,17,0,0)
  470.              (v4,31,0,1.33614,0.146666,1.470876,0.259257,17,1,0)
  471.              (v4,32,0,1.470876,0.259257,1.470876,0.822221,17,1,0)
  472.              (v4,33,0,1.470876,0.822221,1.33614,0.934816,17,1,0)))))
  473.      (g9,34,2048
  474.        (v4,34,33,0.819649,0.146666,0.819649,0.146666,17,0,0)
  475.        (v4,35,33,0.819649,1.16,0.819649,1.16,17,0,0)
  476.        (v4,36,33,1.538245,1.16,1.538245,1.16,17,0,0)
  477.        (v4,37,33,1.538245,0.146666,1.538245,0.146666,17,0,0))))
  478.  (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
  479.   667,6))>
  480.  
  481. <secrule,
  482.     Allow Page Break Within = no,
  483.     Allow Page Break After = yes,
  484.     Autonumber Name =    >
  485.  
  486. <Index, "color", To Named = sectitle><Index, "colormap", To Named = sectitle>
  487. <Frame,
  488.     Name =            "At Anchor",
  489.     Placement =        At Anchor,
  490.     Width =            6.35 inches,
  491.     Height =        0.153 inches,
  492.     Vertical Alignment =    0.007 inches,
  493.     Diagram =
  494. V4,
  495. (g9,1,0
  496.  (v4,1,0,0.006667,0.066723,6.333333,0.066611,17,2,0)
  497.  (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
  498.   667,6))>
  499.  
  500. <p1stacked,
  501.     Font =            F3,
  502.     Left Tab =        -1.70/0 inches>
  503.  
  504. <F8>Colormaps <Tab><F6>9.1<F0><#04>In X, a <F2>color<F0> is defined 
  505. by a set of three numeric values,<SP>representing<FJ>
  506.  
  507. <p1para,
  508.     Font =            F3,
  509.     Left Tab =        -1.70/0 inches>
  510.  
  511. <F8>and Colors<Tab><F0>intensities of red, green, and blue. Red, 
  512. green, and blue are<SP> referred to as the <F2>primary<F0> hues. 
  513. A <F2>colormap<F0> is a list of<SP> colors, each indexed by an integer <F2>p
  514. ixel<F0> value. Each entry in a<SP> colormap is called a color <F2>cell<F0>. 
  515. Raster graphics displays store<SP> pixel values in a special screen 
  516. hardware memory. As the screen hardware<SP>scans this memory, it reads 
  517. each pixel value, looks up the color in the<SP> corresponding cell 
  518. of a colormap, and displays the color on its screen. 
  519.  
  520. <para>
  521.  
  522. The colormap abstraction applies to all classes of visual types supported 
  523. by<SP>X, including those for screens which are actually monochrome. 
  524. For example, <F6>:gray<#1e>scale<F0> screens use colormaps in which 
  525. colors actually specify the monochrome intensity. A typical black<#1e>and<#1e>w
  526. hite monochrome display has a<SP><F6>:static<#1e>gray<F0> screen 
  527. with a two<#1e>cell colormap.
  528.  
  529. The following list describes how pixel values and colormaps are handled 
  530. for each visual class.
  531.  
  532. <bullet>
  533.  
  534. <F9>w<Tab><F6>:direct<#1e>color<F0> <#1f> A pixel value is decomposed 
  535. into separate red, green, and blue subfields. Each subfield indexes 
  536. a separate colormap. Entries in all colormaps can be changed. 
  537.  
  538. <F9>w<Tab><F6>:gray<#1e>scale<F0> <#1f> A pixel value indexes a 
  539. single colormap that contains monochrome intensities. Colormap entries 
  540. can be changed. 
  541.  
  542. <F9>w<Tab><F6>:pseudo<#1e>color<F0> <#1f> A pixel value indexes 
  543. a single colormap that contains color intensities. Colormap entries 
  544. can be changed. 
  545.  
  546. <F9>w<Tab><F6>:static<#1e>color<F0> <#1f> Same as <F6>:pseudo<#1e>color
  547. <F0>, except that the colormap entries are predefined by the hardware 
  548. and cannot be changed. 
  549.  
  550. <F9>w<Tab><F6>:static<#1e>gray<F0> <#1f> Same as <F6>:gray<#1e>scale<F0>, 
  551. except that the colormap entries are predefined by the hardware and 
  552. cannot be changed. 
  553.  
  554. <F9>w<Tab><F6>:true<#1e>color<F0> <#1f> Same as <F6>:direct<#1e>color<F0>, 
  555. except that the colormap entries are predefined by the hardware and 
  556. cannot be changed. Typically, each of the red, green, and blue colormaps 
  557. provides a (near) linear ramp of intensity. 
  558.  
  559. <para>
  560.  
  561. CLX provides functions to create colormaps, access and modify colors 
  562. and<SP> color cells, and install colormaps in screen hardware. 
  563.  
  564. <p1rule>
  565.  
  566. <Index, "color", "changing"><Index, "color", "creating">
  567. <Frame,
  568.     Name =            p1rule,
  569.     Placement =        At Anchor,
  570.     Width =            6.35 inches,
  571.     Height =        0.153 inches,
  572.     Vertical Alignment =    0.007 inches,
  573.     Shared Contents =    yes>
  574.  
  575. <p1para,
  576.     Font =            F3,
  577.     Left Tab =        -1.70/0 inches>
  578.  
  579. <F8>Color Functions<Tab><F6>9.2<F0><#04>A color is represented 
  580. by a CLX color object, in which each of the red,<SP>green, and blue 
  581. values is specified by an <F6>rgb<#1e>val<F0> <#1f> a floating point<SP>numbe
  582. r between 0.0 and 1.0. (see paragraph 1.6, Data Types). The value 
  583. 0.0<SP>represents the minimum intensity, while 1.0 represents the 
  584. maximum<SP>intensity. CLX automatically converts <F6>rgb<#1e>val<F0> 
  585. values into 16<#1e>bit integers<SP>when sending colors to an X server. 
  586. The X server, in turn, scales 16<#1e>bit<SP> color values to match 
  587. the actual intensity range supported by the screen.
  588.  
  589. <para>
  590.  
  591. <|,"9<#1e>100">Colors used on <F6>:gray<#1e>scale<F0> screens must have the 
  592. same value for each of red,<SP>green, and blue. Only one of these 
  593. values is used by screen hardware to<SP>determine intensity; however, 
  594. CLX does not define which of red, green, or<SP>blue is actually used.
  595.  
  596. The following paragraphs describe the CLX functions used to create, 
  597. access, and modify colors.
  598.  
  599. <syntax0>
  600.  
  601. make<#1e>color <F3>&key (<F0>:blue<F3> 1.0) (<F0>:green<F3> 1.0) 
  602. (<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">
  603.  
  604. <return>
  605.  
  606. <Tab><F3>Returns: <F2><HR>
  607.   color <F3><#1f> Type <F0>color<F3>.
  608.  
  609. <para>
  610.  
  611. Creates, initializes, and returns a new <F6>color<F0> object with 
  612. the specified values for red, green, and blue.
  613.  
  614. <keyword2>
  615.  
  616. :blue<F3>, <F0>:green<F3>, <F0>:red <F3><#1f> <F0>rgb<#1e>val<F3> 
  617. values that specify the saturation for each primary.
  618.  
  619. <syntax0>
  620.  
  621. color<#1e>blue <F2>color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>blue", Sort String = "color<#1e>blue">
  622.  
  623. <return>
  624.  
  625. <Tab><F3>Returns: <F2><HR>
  626.   blue<#1e>intensity <F3><#1f> Type <F0>rgb<#1e>val<F3>. 
  627.  
  628. <para>
  629.  
  630. Returns and (with <F6>setf<F0>) sets the value for blue in the <F2>color
  631. <F0>.
  632.  
  633. <arg>
  634.  
  635. color <F3><#1f> A <F6>color<F3> object.
  636.  
  637. <syntax0>
  638.  
  639. color<#1e>green <F2>color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>green", Sort String = "color<#1e>green">
  640.  
  641. <return>
  642.  
  643. <Tab><F3>Returns: <F2><HR>
  644.   green<#1e>intensity <F3><#1f> Type <F0>rgb<#1e>val<F3>.
  645.  
  646. <para>
  647.  
  648. Returns and (with <F6>setf<F0>) sets the value for green in the <F2>color
  649. <F0>.
  650.  
  651. <arg>
  652.  
  653. color <F3><#1f> A <F6>color<F3> object.
  654.  
  655. <syntax0>
  656.  
  657. color<#1e>p <F2>color<F0><Tab><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>p", Sort String = "color<#1e>p">
  658.  
  659. <return>
  660.  
  661. <Tab><F3>Returns: <F2><HR>
  662.   color<#1e>p <F3><#1f> Type <F0>boolean<F3>. 
  663.  
  664. <para>
  665.  
  666. Returns non<#1e><F6>nil<F0> if the argument is a <F6>color<F0> 
  667. object and <F6>nil<F0> otherwise.
  668.  
  669. <syntax0>
  670.  
  671. color<#1e>red <F2>color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>red", Sort String = "color<#1e>red">
  672.  
  673. <return>
  674.  
  675. <Tab><F3>Returns: <F2><HR>
  676.   red<#1e>intensity <F3><#1f> Type <F0>rgb<#1e>val<F3>.
  677.  
  678. <para>
  679.  
  680. Returns and (with <F6>setf<F0>) sets the value for red in the <F2>color
  681. <F0>.
  682.  
  683. <arg>
  684.  
  685. color <F3><#1f> A <F6>color<F3> object.
  686.  
  687. <syntax0>
  688.  
  689. color<#1e>rgb <F2>color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:color<#1e>rgb", Sort String = "color<#1e>rgb">
  690.  
  691. <return>
  692.  
  693. <Tab><F3>Returns: <F2><HR>
  694.   red<F3>,<F2> green<F3>,<F2> blue <F3><#1f> Type <F0>rgb<#1e>val<F3>.
  695.  
  696. <para>
  697.  
  698. Returns the values for red, green, and blue in the <F2>color<F0>.
  699.  
  700. <arg>
  701.  
  702. color <F3><#1f> A <F6>color<F3> object.
  703.  
  704. <p1rule,
  705.     New Page =        yes>
  706.  
  707. <|,"9<#1e>101">
  708. <Frame,
  709.     Name =            p1rule,
  710.     Placement =        At Anchor,
  711.     Width =            6.35 inches,
  712.     Height =        0.153 inches,
  713.     Vertical Alignment =    0.007 inches,
  714.     Shared Contents =    yes>
  715.  
  716. <p1stacked,
  717.     Font =            F3,
  718.     Left Tab =        -1.70/0 inches>
  719.  
  720. <F8>Colormap <Tab><F6>9.3<F0><#04>A colormap is represented in 
  721. CLX by a <F6>colormap<F0> object. A CLX<FJ>
  722.  
  723. <p1para,
  724.     Font =            F3,
  725.     Left Tab =        -1.70/0 inches>
  726.  
  727. <F8>Functions<Tab><F0>program can create and manipulate several <F6>colormap
  728. <F0> objects. However, the<SP>colors contained in a <F6>colormap<F0> 
  729. are made visible only when the <F6>colormap<F0> is<SP><F2>installed<F0>. 
  730. Each window is associated with a <F6>colormap<F0> that is used<SP> 
  731. to translate window pixels into colors (see <F6>window<#1e>colormap<F0>). 
  732. However, a<SP>window will appear in its true colors only if its associated 
  733. <F6>colormap<F0> is<SP> installed. 
  734.  
  735. <para>
  736.  
  737. The total number of colormaps that can be installed depends on the 
  738. screen<SP>hardware. Most hardware devices allow exactly one <F6>colormap<F0> 
  739. to be installed<SP> at any time. That is, <F6>screen<#1e>min<#1e>installed<#1e>
  740. maps<F0> and<SP> <F6>screen<#1e>max<#1e>installed<#1e>maps<F0> 
  741. are both equal to 1. Installing a new <F6>colormap<F0><SP> can cause 
  742. a previously installed <F6>colormap<F0> to be uninstalled. It is<SP> 
  743. important to remember that the set of installed <F6>colormaps<F0> 
  744. is a hardware<SP>resource shared cooperatively among all client programs 
  745. connected to an X<SP> server.
  746.  
  747. A CLX program can control the contents of <F6>colormaps<F0> by allocating 
  748. color<SP>cells in one of two ways: read<#1e>only or read<#1e>write. 
  749. Allocating a read<#1e>only<SP> color cell establishes a color value 
  750. for a specified pixel value that cannot<SP> be changed. However, read<#1e>only 
  751. color cells can be shared among all client<SP> programs. Read<#1e>only 
  752. allocation is the best strategy for making use of<SP>limited <F6>colormap
  753. <F0> hardware in a multi<#1e>client environment.
  754.  
  755. Alternatively, allocating a read<#1e>write color cell allows a client 
  756. the<SP>exclusive right to set the color value stored in the cell. 
  757. A cell allocated<SP>read<#1e>write by one client cannot be allocated 
  758. by another client, not even as<SP> a read<#1e>only cell. Note that 
  759. read<#1e>write allocation is not allowed for<SP> screens whose visual 
  760. type belongs to one of the <F6>:static<#1e>gray<F0>, <F6>:static<#1e>color
  761. <F0>, or<SP><F6>:true<#1e>color<F0> classes. For screens of these 
  762. classes, <F6>colormap<F0> cells cannot be<SP>modified.
  763.  
  764. Two entries of the default colormap, typically containing the colors 
  765. black and white, are automatically allocated read<#1e>only. The pixel 
  766. values for these entries can be returned by the functions <F6>screen<#1e>black
  767. <#1e>pixel<F0> and <F6>screen<#1e>white<#1e>pixel<F0>. Applications 
  768. that need only two colors and also need to operate on both monochrome 
  769. and color screens should always use these pixel values. The names <F2>black
  770. <F0> and <F2>white<F0> are intended to reflect relative intensity 
  771. levels and need not reflect the actual colors displayed for these 
  772. pixel values.
  773.  
  774. Each screen has a default <F6>colormap<F0>, which is initially installed. 
  775. By<SP> conventions, clients should allocate only read<#1e>only cells 
  776. from the default<SP> <F6>colormap<F0>.
  777.  
  778. <p2rule>
  779.  
  780. <Frame,
  781.     Name =            p2rule,
  782.     Placement =        At Anchor,
  783.     Width =            4.75 inches,
  784.     Height =        0.15 inches,
  785.     Vertical Alignment =    0.007 inches,
  786.     Shared Contents =    yes>
  787.  
  788. <p2stacked,
  789.     Font =            F3>
  790.  
  791. <Index, "colormap", "creating", To Named = p2rule><Tab><F6>Creating<Tab>9.3.1<F0><#04>CLX provides 
  792. functions for creating and freeing new <F6>colormap<FJ>
  793.  
  794. <p2para,
  795.     Font =            F3>
  796.  
  797. <Tab><F6>Colormaps<Tab><F0>objects.
  798.  
  799. <syntax0>
  800.  
  801. create<#1e>colormap <F2>visual window <F3>&optional<F2> alloc<#1e>p<F0><Tab>
  802. <F3>Function<Index, Doc = operations, "xlib:create<#1e>colormap", Sort String = "create<#1e>colormap">
  803.  
  804. <return>
  805.  
  806. <Tab><F3>Returns: <F2><HR>
  807.   colormap <F3><#1f> Type <F0>colormap<F3>.
  808.  
  809. <para>
  810.  
  811. Creates and returns a <F2>colormap<F0> of the specified <F2>visual<F0> 
  812. type for the screen<SP>containing the <F2>window<F0>. The <F2>visual<F0> 
  813. type must be one of those supported by the screen.
  814.  
  815. Initial color cell values are undefined for visual types belonging 
  816. to the<SP> <F6>:gray<#1e>scale<F0>, <F6>:pseudo<#1e>color<F0>, 
  817. and <F6>:direct<#1e>color<F0> classes. Color cell values<SP>for 
  818. visual types belonging to the <F6>:static<#1e>gray<F0>, <F6>:static<#1e>colo
  819. r<F0>, and<SP><F6>:true<#1e>color<F0> classes have initial values 
  820. defined by the visual type.<SP>However, X does not define the set 
  821. of possible visual types or their initial color cell values.
  822.  
  823. If <F2>alloc<#1e>p<F0> is true, all colormap cells are permanently 
  824. allocated<SP>read<#1e>write and cannot be freed by <F6>free<#1e>colors<F0>. 
  825. It is an error for <F2>alloc<#1e>p<F0><SP> to be true when the visual 
  826. type belongs to the <F6>:static<#1e>gray<F0>, <F6>:static<#1e>color<F0>,<SP>
  827. or <F6>:true<#1e>color <F0>classes.
  828.  
  829. <arg>
  830.  
  831. <|,"9<#1e>102">visual <F3><#1f> A <F6>visual<F3> type ID.
  832.  
  833. window<F3> <#1f> A <F6>window<F3>.
  834.  
  835. alloc<#1e>p<F3> <#1f> Specifies whether <F6>colormap<F3> cells 
  836. are permanently allocated<SP>read<#1e>write.
  837.  
  838. <syntax0>
  839.  
  840. 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">
  841.  
  842. <return>
  843.  
  844. <Tab><F3>Returns: <F2><HR>
  845.   new<#1e>colormap <F3><#1f> Type <F0>colormap<F3>.
  846.  
  847. <para,
  848.     Bottom Margin =        0.12 inches>
  849.  
  850. Creates and returns a new <F6>colormap<F0> by copying, then freeing, 
  851. allocated cells<SP>from the specified <F2>colormap<F0>.
  852.  
  853. All color cells allocated read<#1e>only or read<#1e>write in the original 
  854. <F6>colormap<F0><SP>have the same color values and the same allocation 
  855. status in the <F2>new<#1e>colormap<F0>. The values of unallocated 
  856. color cells in the <F2>new<#1e>colormap<F0> are<SP>undefined. After 
  857. copying, all allocated color cells in the original<SP><F6>colormap<F0> 
  858. are freed, as if <F6>free<#1e>colors<F0> was called. The unallocated 
  859. cells of<SP> the original <F6>colormap<F0> are not affected.
  860.  
  861. If<F2> alloc<#1e>p<F0> was true when the original <F6>colormap<F0> 
  862. was created, then all color<SP>cells of the <F2>new<#1e>colormap<F0> 
  863. are permanently allocated read<#1e>write, and all the<SP> color cells 
  864. of the original <F6>colormap<F0> are freed.
  865.  
  866. <arg>
  867.  
  868. colormap<F3> <#1f> A <F6>colormap<F3>.
  869.  
  870. <syntax,
  871.     Left Tab =        -0.90/0 inches,
  872.     Right Tab =        7.50 inches>
  873.  
  874. free<#1e>colormap <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:free<#1e>colormap", Sort String = "free<#1e>colormap">
  875.  
  876. <para>
  877.  
  878. Destroys the <F2>colormap<F0> and frees its server resource. If 
  879. the <F2>colormap<F0> is<SP>installed, it is uninstalled. For any 
  880. window associated with the <F2>colormap<F0>,<SP>the window is assigned 
  881. a <F6>nil<F0> <F6>colormap<F0>, and a <F6>:colormap<#1e>notify<F0> 
  882. event is<SP> generated. The colors displayed for a window with a <F6>nil<F0> 
  883. <F6>colormap<F0> are<SP>undefined.
  884.  
  885. However, this function has no effect if the <F2>colormap<F0> is 
  886. a screen default<SP> <F6>colormap<F0>.
  887.  
  888. <arg>
  889.  
  890. colormap<F3> <#1f> A <F6>colormap<F3>.
  891.  
  892. <p2rule>
  893.  
  894. <Frame,
  895.     Name =            p2rule,
  896.     Placement =        At Anchor,
  897.     Width =            4.75 inches,
  898.     Height =        0.15 inches,
  899.     Vertical Alignment =    0.007 inches,
  900.     Shared Contents =    yes>
  901.  
  902. <p2stacked,
  903.     Font =            F3>
  904.  
  905. <Index, "colormap", "installing", To Named = p2rule><Tab><F6>Installing<Tab>9.3.2<F0><#04>The following 
  906. paragraphs describe the CLX functions to install and<FJ>
  907.  
  908. <p2para,
  909.     Font =            F3>
  910.  
  911. <Tab><F6>Colormaps<Tab><F0>uninstall colormaps and to return the 
  912. set of installed colormaps.
  913.  
  914. <para>
  915.  
  916. Initially, the default <F6>colormap<F0> for a screen is installed 
  917. (but is not in the required list).
  918.  
  919. <syntax,
  920.     Left Tab =        -0.90/0 inches,
  921.     Right Tab =        7.50 inches>
  922.  
  923. install<#1e>colormap <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:install<#1e>colormap", Sort String = "install<#1e>colormap">
  924.  
  925. <para>
  926.  
  927. Installs the <F2>colormap.<F0> All windows associated with this <F2>colormap
  928. <F0> immediately display with true colors. As a side<#1e>effect, 
  929. additional colormaps might be implicitly uninstalled by the server. 
  930.  
  931. If the specified <F2>colormap<F0> is not already installed, a <F6>:colormap<#1e>
  932. notify<F0> event is generated on every window associated with this <F2>colorm
  933. ap<F0>. In addition, for every other colormap that is implicitly 
  934. uninstalled, a <F6>:colormap<#1e>notify<F0> event is generated on 
  935. every associated window.
  936.  
  937. <arg>
  938.  
  939. colormap <F3><#1f> A <F6>colormap<F3>.
  940.  
  941. <syntax0>
  942.  
  943. installed<#1e>colormaps <F2>window<F3> &key (<F0>:result<#1e>type<F3> 
  944. <F0>'list<F3>)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:installed<#1e>colormaps", Sort String = "installed<#1e>colormaps">
  945.  
  946. <return>
  947.  
  948. <Tab><F3>Returns: <F2><HR>
  949.   colormap <F3><#1f> Type <F0>sequence<F3> of <F0>colormap<F3>. 
  950.  
  951. <para>
  952.  
  953. Returns a sequence containing the installed <F6>colormaps<F0> for 
  954. the screen of the specified <F2>window<F0>. The order of the colormaps 
  955. is not significant.
  956.  
  957. <arg>
  958.  
  959. window <F3><#1f> A <F6>window<F3>.
  960.  
  961. <keyword2>
  962.  
  963. <|,"9<#1e>103">:result<#1e>type <F3><#1f> A sub<#1e>type of <F0>sequence <F3>that
  964. <F0> <F3>indicates the type of sequence to return.
  965.  
  966. <syntax,
  967.     Left Tab =        -0.90/0 inches,
  968.     Right Tab =        7.50 inches>
  969.  
  970. uninstall<#1e>colormap <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:uninstall<#1e>colormap", Sort String = "uninstall<#1e>colormap">
  971.  
  972. <para>
  973.  
  974. Uninstalls the <F2>colormap<F0>. However, the <F2>colormap<F0> 
  975. is not actually uninstalled<SP>if this would reduce the set of installed 
  976. colormaps below the value of<SP> <F6>screen<#1e>min<#1e>installed<#1e>maps
  977. <F0>. If the <F2>colormap<F0> is actually uninstalled, a<SP><F6>:colormap<#1e>
  978. notify<F0> event is generated on every associated window.
  979.  
  980. <arg>
  981.  
  982. colormap <F3><#1f> A <F6>colormap<F3>.
  983.  
  984. <p2rule>
  985.  
  986. <Frame,
  987.     Name =            p2rule,
  988.     Placement =        At Anchor,
  989.     Width =            4.75 inches,
  990.     Height =        0.15 inches,
  991.     Vertical Alignment =    0.007 inches,
  992.     Shared Contents =    yes>
  993.  
  994. <p2para,
  995.     Font =            F3>
  996.  
  997. <Index, "color", "allocating", To Named = p2rule><Tab><F6>Allocating Colors<Tab>9.3.3<#04><F0>The 
  998. following paragraphs describe the functions for allocating read<#1e>only 
  999. and read<#1e>write color cells, allocating color planes, and freeing 
  1000. color cells.
  1001.  
  1002. <syntax0>
  1003.  
  1004. alloc<#1e>color <F2>colormap color<F0><Tab><F3>Function<Index, Doc = operations, "xlib:alloc<#1e>color", Sort String = "alloc<#1e>color">
  1005.  
  1006. <return>
  1007.  
  1008. <Tab><F3>Returns: <F2><HR>
  1009.   pixel<F3> <#1f> Type <F0>pixel<F3>.<HR>
  1010.   <F2>screen<#1e>color<F3>,<F2> exact<#1e>color <F3><#1f> Type <F0>color
  1011. <F3>.
  1012.  
  1013. <para>
  1014.  
  1015. Returns a <F2>pixel<F0> for a read<#1e>only color cell in the <F2>colormap
  1016. <F0>. The color in the allocated cell is the closest approximation 
  1017. to the<SP>requested <F2>color<F0> possible for the screen hardware. 
  1018. The other<SP>values returned give both the approximate color stored 
  1019. in the cell and the exact color requested.
  1020.  
  1021. The requested <F2>color<F0> can be either a <F6>color<F0> object 
  1022. or a <F6>stringable<F0><SP>containing a color name. If a color name 
  1023. is given, a corresponding<SP>color value is looked up (see <F6>lookup<#1e>colo
  1024. r<F0>) and used. Color name<SP>strings must contain only ISO Latin<#1e>1 
  1025. characters; case is not<SP>significant.
  1026.  
  1027. <arg>
  1028.  
  1029. colormap<F3> <#1f> A <F6>colormap<F3>.
  1030.  
  1031. color<F3> <#1f> A <F6>color<F3> object or a <F6>stringable<F3> 
  1032. containing a color name.
  1033.  
  1034. <syntax0>
  1035.  
  1036. alloc<#1e>color<#1e>cells <F2>colormap colors<F3> &key (<F0>:planes<F3> 
  1037. 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>
  1038. (<F0>:result<#1e>type<F3> <F0>'list<F3>)
  1039.  
  1040. <return>
  1041.  
  1042. <Tab><F3>Returns: <F2><HR>
  1043.   pixels, mask <F3><#1f> Type <F0>sequence<F3> of <F0>pixels<F3>.
  1044.  
  1045. <para>
  1046.  
  1047. Returns a <F6>sequence<F0> of <F2>pixels<F0> for read<#1e>write 
  1048. color cells in the <F2>colormap<F0>.<SP> The allocated cells contain 
  1049. undefined color values. The visual type<SP>class of the <F6>colormap<F0> 
  1050. must be either <F6>:gray<#1e>scale<F0>, <F6>:pseudo<#1e>color<F0>,<SP>or 
  1051. <F6>:direct<#1e>color<F0>.
  1052.  
  1053. The <F2>colors<F0> argument and the <F6>:planes<F0> argument define 
  1054. the number of pixels<SP>and the number of masks returned, respectively. 
  1055. The number of colors<SP>must be positive, and the number of planes 
  1056. must be non<#1e>negative. A<SP>total of (* <F2>colors<F0> (<F6>expt<F0> 
  1057. 2 <F2>planes<F0>)) color cells are allocated. The pixel<SP>values 
  1058. for the allocated cells can be computed by combining the returned<SP>pixels 
  1059. and masks.
  1060.  
  1061. The length of the returned masks sequence is equal to <F6>:planes<F0>. 
  1062. Each mask<SP>of the returned masks sequence defines a single bitplane. 
  1063. None of the<SP> masks have any 1 bits in common. Thus, by selectively 
  1064. combining masks<SP>with <F6>logior<F0>, (<F6>expt<F0> 2 <F2>planes<F0>) 
  1065. distinct combined plane masks can be<SP> computed.
  1066.  
  1067. The length of the returned <F2>pixels<F0> sequence is equal to <F2>colors
  1068. <F0>. None of<SP> the pixels have any 1 bits in common with each 
  1069. other or with any of the<SP>returned masks. By combining pixels and 
  1070. plane masks with <F6>logior<F0>, (*<SP><F2>colors<F0> (<F6>expt<F0> 
  1071. 2 <F2>planes<F0>)) distinct pixel values can be produced.
  1072.  
  1073. <|,"9<#1e>104">If the <F2>colormap<F0> class is <F6>:gray<#1e>scale<F0> 
  1074. or <F6>:pseudo<#1e>color<F0>, each <F2>mask<F0><SP>will have exactly 
  1075. one bit set. If the <F6>colormap<F0> class is <F6>:direct<#1e>color<F0>,<SP>
  1076. each <F2>mask<F0> will have exactly three bits set. If <F6>:contiguous<#1e>p
  1077. <F0> is<SP>true, combining all masks with <F6>logior<F0> produces 
  1078. a plane mask<SP>with either one set of contiguous bits (for <F6>:gray<#1e>scal
  1079. e<F0> and<SP><F6>:pseudo<#1e>color<F0>) or three sets of contiguous 
  1080. bits (for <F6>:direct<#1e>color<F0>).
  1081.  
  1082. <arg>
  1083.  
  1084. colormap<F3> <#1f> A <F6>colormap<F3>.
  1085.  
  1086. colors<F3> <#1f> A positive number defining the length of the pixels<SP>sequen
  1087. ce returned.
  1088.  
  1089. <F6>:planes<F3> <#1f> A non<#1e>negative number defining the length 
  1090. of the masks<SP>sequence returned.
  1091.  
  1092. <F6>:contiguous<#1e>p<F3> <#1f> If true, the masks form contiguous 
  1093. sets of bits.
  1094.  
  1095. <F6>:result<#1e>type<F3> <#1f> A subtype of <F6>sequence<F3> that 
  1096. indicates the type of<SP>sequences returned.
  1097.  
  1098. <syntax0>
  1099.  
  1100. alloc<#1e>color<#1e>planes <F2>colormap colors <F3>&key (<F0>:reds<F3> 
  1101. 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>
  1102. <F0>:contiguous<#1e>p<F3> (:<F0>result<#1e>type<F3> <F0>'list<F3>)
  1103.  
  1104. <return>
  1105.  
  1106. <Tab><F3>Returns: <HR>
  1107.   <F2>pixels <F3><#1f> Type <F0>sequence<F3> of <F0>pixel<F3>. <HR>
  1108.   <F2>red<#1e>mask<F3>, <F2>green<#1e>mask<F3>, <F2>blue<#1e>mask <F3><#1f> 
  1109. Type <F0>pixel<F3>.
  1110.  
  1111. <para>
  1112.  
  1113. Returns a <F6>sequence<F0> of <F2>pixels<F0> for read<#1e>write 
  1114. color cells in the <F2>colormap<F0>.<SP> The allocated cells contain 
  1115. undefined color values. The visual type<SP>class of the <F2>colormap<F0> 
  1116. must be either <F6>:gray<#1e>scale<F0>, <F6>:pseudo<#1e>color<F0>,<SP>or 
  1117. <F6>:direct<#1e>color<F0>.
  1118.  
  1119. The <F2>colors<F0> argument defines the number of pixels returned. 
  1120. The <F6>:reds<F0>,<SP><F6>:greens<F0>, and <F6>:blues<F0> arguments 
  1121. define the number of bits set in the<SP>returned red, green, and blue 
  1122. masks, respectively. The number of colors<SP>must be positive, and 
  1123. the number of bits for each mask must be<SP>non<#1e>negative. A total 
  1124. of (* <F2>colors<F0> (<F6>expt<F0> 2 (+ <F2>reds greens blues<F0>)))<SP>c
  1125. olor cells are allocated. The pixel values for the allocated cells 
  1126. can<SP>be computed by combining the returned <F2>pixels<F0> and 
  1127. masks.
  1128.  
  1129. Each mask of the returned masks defines a pixel subfield for the corresponding 
  1130. primary. None of the masks have any 1 bits in common. By<SP>selectively 
  1131. combining subsets of the red, green, and blue masks with<SP><F6>logior<F0>, 
  1132. (<F6>expt<F0> 2<FJ>
  1133. (+ <F2>reds greens blues<F0>) distinct combined plane masks can<SP>be 
  1134. computed.
  1135.  
  1136. The length of the returned <F2>pixels<F6> sequence<F0> is equal 
  1137. to <F2>colors<F0>. None of<SP>the pixels have any 1 bits in common 
  1138. with each other or with any of the<SP>returned masks. By combining 
  1139. pixels and plane masks with <F6>logior<F0>, (*<SP><F2>colors<F0> 
  1140. (<F6>expt<F0> 2 (+ <F2>reds greens blues<F0>)) distinct pixel 
  1141. values can be<SP>produced.
  1142.  
  1143. If <F6>:contiguous<#1e>p<F0> is true, each of returned masks consists 
  1144. of a set<SP>of contiguous bits. If the <F6>colormap<F0> class is <F6>:direct
  1145. <#1e>color<F0>, each<SP>returned mask lies within the pixel subfield 
  1146. for its primary.
  1147.  
  1148. <arg>
  1149.  
  1150. colormap<F3> <#1f> A <F6>colormap<F3>.
  1151.  
  1152. colors <F3><#1f> A positive number defining the length of the pixels<SP>sequen
  1153. ce returned.
  1154.  
  1155. <F6>:planes<F3> <#1f> A non<#1e>negative number defining the length 
  1156. of the masks<SP> sequence returned.
  1157.  
  1158. <F6>:contiguous<#1e>p<F3> <#1f> If true, then the masks form contiguous 
  1159. sets of bits.
  1160.  
  1161. <F6>:result<#1e>type<F3> <#1f> A subtype of <F6>sequence<F3> that 
  1162. indicates the type of<SP> sequences returned.<SP><F0> 
  1163.  
  1164. <syntax,
  1165.     Left Tab =        -0.90/0 inches,
  1166.     Right Tab =        7.50 inches>
  1167.  
  1168. free<#1e>colors <F2>colormap pixels <F3>&optional (<F2>plane<#1e>mask<F3> 
  1169. 0)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:free<#1e>colors", Sort String = "free<#1e>colors">
  1170.  
  1171. <para>
  1172.  
  1173. Frees a set of allocated color cells from the <F2>colormap<F0>. 
  1174. The pixel<SP>values for the freed cells are computed by combining 
  1175. the given <F2>pixels<F0><SP>sequence and <F6>:plane<#1e>mask<F0>. 
  1176. The total number of cells freed is: 
  1177.  
  1178. <|,"9<#1e>105">(* (<F6>length<F2><SP> pixels<F0>) (<F6>expt<F0> 2 (<F6>logcount
  1179. <F0> <F2>plane<#1e>mask<F0>)))
  1180.  
  1181. The <F6>:plane<#1e>mask<F0> must not have any bits in common with 
  1182. any of the given<SP><F2>pixels<F0>. The pixel values for the freed 
  1183. cells are produced by using<SP><F6>logior<F0> to combine each of 
  1184. the given pixels with all subsets of the<SP><F6>:plane<#1e>mask<F0>.
  1185.  
  1186. Note that freeing an individual pixel allocated by <F6>alloc<#1e>color<#1e>pla
  1187. nes<F0><SP>may not allow it to be reused until all related pixels 
  1188. computed from the<SP>same plane mask are also freed.
  1189.  
  1190. A single error is generated if any computed pixel is invalid or if 
  1191. its<SP>color cell is not allocated by the client. Even if an error 
  1192. is<SP>generated, all valid pixel values are freed.
  1193.  
  1194. <arg>
  1195.  
  1196. colormap<F3> <#1f> A <F6>colormap<F3>.
  1197.  
  1198. pixels<F3> <#1f> A <F6>sequence<F3> of pixel values.
  1199.  
  1200. plane<#1e>mask<F3> <#1f> A pixel value with no bits in common with 
  1201. any of the <F0>pixels<F3>.
  1202.  
  1203. <p2rule>
  1204.  
  1205. <Frame,
  1206.     Name =            p2rule,
  1207.     Placement =        At Anchor,
  1208.     Width =            4.75 inches,
  1209.     Height =        0.15 inches,
  1210.     Vertical Alignment =    0.007 inches,
  1211.     Shared Contents =    yes>
  1212.  
  1213. <p2para,
  1214.     Font =            F3>
  1215.  
  1216. <Index, "color", "finding", To Named = p2rule><Tab><F6>Finding Colors<Tab>9.3.4<#04><F0>A 
  1217. CLX program can ask the X server to return the colors stored in<SP>allocated 
  1218. color cells. The server also maintains a dictionary of color<SP>names 
  1219. and their associated color values. CLX provides a function to<SP> 
  1220. look up the values for common colors by names such as <#7f>red", <#7f>purple",<SP>
  1221. and so forth. The following paragraphs describe the CLX functions 
  1222. for returning the color<SP>values associated with color cells or with 
  1223. color names.
  1224.  
  1225. <syntax0>
  1226.  
  1227. lookup<#1e>color <F2>colormap name<F0><Tab><F3>Function<Index, Doc = operations, "xlib:lookup<#1e>color", Sort String = "lookup<#1e>color">
  1228.  
  1229. <return>
  1230.  
  1231. <Tab><F3>Returns: <F2><HR>
  1232.   screen<#1e>color<F3>,<F2> exact<#1e>color <F3><#1f> Type <F0>color<F3>.
  1233.  
  1234. <para>
  1235.  
  1236. Returns the color associated by the X server with the given color <F2>name
  1237. <F0>.<SP> The <F2>name<F0> must contain only ISO Latin<#1e>1 characters; 
  1238. case is not<SP>significant. The first value returned is the closest 
  1239. approximation to<SP>the requested color possible on the screen hardware. 
  1240. The second value<SP>returned is the true color value for the requested 
  1241. color.
  1242.  
  1243. <arg>
  1244.  
  1245. colormap <F3><#1f> A <F6>colormap<F3>.
  1246.  
  1247. name <F3><#1f> A <F6>stringable<F3> color name.
  1248.  
  1249. <syntax0>
  1250.  
  1251. query<#1e>colors <F2>colormap pixels<F3> &key (<F0>:result<#1e>type<F3> 
  1252. <F0>'list<F3>)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:query<#1e>colors", Sort String = "query<#1e>colors">
  1253.  
  1254. <return>
  1255.  
  1256. <Tab><F3>Returns: <F2><HR>
  1257.   colors <F3><#1f> Type <F0>sequence<F3> of <F0>color<F3>. 
  1258.  
  1259. <para>
  1260.  
  1261. Returns a <F6>sequence<F0> of the colors contained in the allocated 
  1262. cells of the<SP><F2>colormap<F0> specified by the given <F2>pixels<F0>. 
  1263. The values returned for<SP>unallocated cells are undefined.
  1264.  
  1265. <arg>
  1266.  
  1267. colormap<F3> <#1f> A <F6>colormap<F3>.
  1268.  
  1269. pixels<F3> <#1f> A <F6>sequence<F3> of <F6>pixel<F3> values.
  1270.  
  1271. <F6>:result<#1e>type<F3> <#1f> A subtype of <F6>sequence<F3> that 
  1272. indicates the type of<SP> sequences returned.
  1273.  
  1274. <p2rule>
  1275.  
  1276. <Frame,
  1277.     Name =            p2rule,
  1278.     Placement =        At Anchor,
  1279.     Width =            4.75 inches,
  1280.     Height =        0.15 inches,
  1281.     Vertical Alignment =    0.007 inches,
  1282.     Shared Contents =    yes>
  1283.  
  1284. <p2para,
  1285.     Font =            F3>
  1286.  
  1287. <Index, "color", "changing", To Named = p2rule><Tab><F6>Changing Colors<Tab>9.3.5<#04><F0>The 
  1288. following paragraphs describe the CLX functions to change the colors 
  1289. in<SP> colormap cells.
  1290.  
  1291. <syntax,
  1292.     Left Tab =        -0.90/0 inches,
  1293.     Right Tab =        7.50 inches>
  1294.  
  1295. store<#1e>color <F2>colormap pixel color<F3> &key (<F0>:red<#1e>p<F3> 
  1296. <F0>t<F3>) (<F0>:green<#1e>p<F3> <F0>t<F3>) (<F0>:blue<#1e>p<F3> <F0>t
  1297. <F3>)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:store<#1e>color", Sort String = "store<#1e>color">
  1298.  
  1299. <para>
  1300.  
  1301. Changes the contents of the <F2>colormap<F0> cell indexed by the <F2>pixel
  1302. <F0>. Components of the given <F2>color<F0> are stored in the cell. 
  1303. The <F6>:red<#1e>p<F0>, <F6>:green<#1e>p<F0>, and <F6>:blue<#1e>p<F0> 
  1304. arguments indicate which components of the given<SP><F2>color<F0> 
  1305. are stored.
  1306.  
  1307. <|,"9<#1e>106">The <F2>color<F0> can be either a <F6>color<F0> object or 
  1308. a <F6>stringable<F0> containing a<SP>color name. If a color name 
  1309. is given, a corresponding color value is<SP>looked up (see <F6>lookup<#1e>colo
  1310. r<F0>) and used. Color name strings must contain<SP> only ISO Latin<#1e>1 
  1311. characters; case is not significant.
  1312.  
  1313. <arg>
  1314.  
  1315. colormap<F3> <#1f> A <F6>colormap<F3>.
  1316.  
  1317. pixel<F3> <#1f> A <F6>pixel<F3>.
  1318.  
  1319. color<F3> <#1f> A color <F6>object<F3> or a <F6>stringable<F3> 
  1320. containing a color name. 
  1321.  
  1322. <F6>:red<#1e>p<F3>, <F6>:green<#1e>p<F3>, <F6>:blue<#1e>p<F3><SP><#1f> 
  1323. <F6>boolean<F3> values indicating which color components to store.
  1324.  
  1325. <syntax,
  1326.     Left Tab =        -0.90/0 inches,
  1327.     Right Tab =        7.50 inches>
  1328.  
  1329. store<#1e>colors <F2>colormap pixel<#1e>colors <F3>&key (<F0>:red<#1e>p
  1330. <F3> <F0>t<F3>) (<F0>:green<#1e>p<F3> <F0>t<F3>) (<F0>:blue<#1e>p<F3> 
  1331. <F0>t<F3>)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:store<#1e>colors", Sort String = "store<#1e>colors">
  1332.  
  1333. <para>
  1334.  
  1335. Changes the contents of multiple <F2>colormap<F0> cells. <F2>pixel<#1e>color
  1336. s<F0> is a list<SP> of the form ({<F2>pixel color<F0>}*), indicating 
  1337. a set of pixel values and the colors to store in the corresponding 
  1338. cells. The <F6>:red<#1e>p<F0>, <F6>:green<#1e>p<F0>, and<SP><F6>:blue<#1e>
  1339. p<F0> arguments indicate which components of the given colors are<SP>stored.
  1340.  
  1341. Each color can be either a <F6>color<F0> object or a <F6>stringable<F0> 
  1342. containing a<SP>color name. If a color name is given, a corresponding 
  1343. color value is<SP>looked up (see <F6>lookup<#1e>color<F0>) and used. 
  1344. Color name strings must contain<SP>only ISO Latin<#1e>1 characters; 
  1345. case is not significant.
  1346.  
  1347. <arg>
  1348.  
  1349. colormap<F3> <#1f> A <F6>colormap<F3>.
  1350.  
  1351. pixel<#1e>colors <F3><#1f> A list of the form ({<F0>pixel color<F3>}*).
  1352.  
  1353. <F6>:red<#1e>p<F3>, <F6>:green<#1e>p<F3>, <F6>:blue<#1e>p<F3><SP><#1f> 
  1354. <F6>boolean<F3> values indicating which color components to store.
  1355.  
  1356. <p2rule,
  1357.     New Page =        yes>
  1358.  
  1359. <|,"9<#1e>107">
  1360. <Frame,
  1361.     Name =            p2rule,
  1362.     Placement =        At Anchor,
  1363.     Width =            4.75 inches,
  1364.     Height =        0.15 inches,
  1365.     Vertical Alignment =    0.007 inches,
  1366.     Shared Contents =    yes>
  1367.  
  1368. <p2stacked,
  1369.     Font =            F3>
  1370.  
  1371. <Index, "colormap", "accessors"><Tab><F6>Colormap<Tab>9.3.6<#04><F0>The complete 
  1372. set of colormap attributes is discussed in the following<FJ>
  1373.  
  1374. <p2para,
  1375.     Font =            F3>
  1376.  
  1377. <Tab><F6>Attributes<Tab><F0>paragraphs.
  1378.  
  1379. <syntax0>
  1380.  
  1381. colormap<#1e>display<F3> <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:colormap<#1e>display", Sort String = "colormap<#1e>display">
  1382.  
  1383. <return>
  1384.  
  1385. <Tab><F3>Returns: <F2><HR>
  1386.   display <F3><#1f> Type <F0>display<F3>. 
  1387.  
  1388. <para>
  1389.  
  1390. Returns the <F6>display<F0> object associated with the specified <F2>colorma
  1391. p<F0>. 
  1392.  
  1393. <arg>
  1394.  
  1395. colormap <#1f> <F3>A <F6>colormap<F3>. 
  1396.  
  1397. <syntax,
  1398.     Left Tab =        -0.90/0 inches,
  1399.     Right Tab =        7.50 inches>
  1400.  
  1401. colormap<#1e>equal <F2>colormap<#1e>1<F3> <F2>colormap<#1e>2<F0><Tab><F3>F
  1402. unction<Index, Doc = operations, "xlib:colormap<#1e>equal", Sort String = "colormap<#1e>equal">
  1403.  
  1404. <para>
  1405.  
  1406. Returns true if the two arguments refer to the same server resource 
  1407. and <F6>nil<F0> if they do not.
  1408.  
  1409. <arg>
  1410.  
  1411. colormap<#1e>1<F3>, <F0>colormap<#1e>2 <F3><#1f> A <F6>colormap<F3>.
  1412.  
  1413. <syntax0>
  1414.  
  1415. colormap<#1e>id <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:colormap<#1e>id", Sort String = "colormap<#1e>id">
  1416.  
  1417. <return>
  1418.  
  1419. <Tab><F3>Returns: <F2><HR>
  1420.   id <F3><#1f> Type <F0>resource<#1e>id<F3>.
  1421.  
  1422. <para>
  1423.  
  1424. Returns the unique ID assigned to the specified <F2>colormap<F0>.
  1425.  
  1426. <arg>
  1427.  
  1428. colormap <F3><#1f> A <F6>colormap<F3>.
  1429.  
  1430. <syntax0>
  1431.  
  1432. colormap<#1e>p <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:colormap<#1e>p", Sort String = "colormap<#1e>p">
  1433.  
  1434. <return>
  1435.  
  1436. <Tab><F3>Returns: <F2><HR>
  1437.   map<#1e>p <F3><#1f> Type <F0>boolean<F3>.
  1438.  
  1439. <para>
  1440.  
  1441. Returns non<#1e><F6>nil<F0> if the argument is a <F6>colormap<F0> 
  1442. and <F6>nil<F0> otherwise.
  1443.  
  1444. <syntax0>
  1445.  
  1446. colormap<#1e>plist <F2>colormap<F0><Tab><F3>Function<Index, Doc = operations, "xlib:colormap<#1e>plist", Sort String = "colormap<#1e>plist">
  1447.  
  1448. <return>
  1449.  
  1450. <Tab><F3>Returns: <F2><HR>
  1451.   colormap<#1e>p <F3><#1f> Type <F0>boolean<F3>.<F2> 
  1452.  
  1453. <para>
  1454.  
  1455. Returns and (with <F6>setf<F0>) sets the property list for the specified 
  1456. <F2>colormap<F0>. This function provides a hook where extensions 
  1457. can add data.
  1458.  
  1459. <arg>
  1460.  
  1461. colormap <F3><#1f> A <F6>colormap<F3>.
  1462.  
  1463. <newpage>
  1464.  
  1465. <|,"9<#1e>108">
  1466.