DIRECTORY CD USING [Layer], Imager USING [Color], ImagerColor USING [RGB], ImagerInterpress USING [Ref], IO USING [STREAM], Rope USING [ROPE]; NectarineColors: CEDAR DEFINITIONS ~ BEGIN Color: TYPE ~ Imager.Color; Bitset: TYPE ~ PACKED ARRAY CD.Layer OF BOOLEAN _ ALL [FALSE]; BlendKey: TYPE ~ REF Bitset; Blend: TYPE ~ REF BlendRec; BlendRec: TYPE ~ RECORD [count: CD.Layer _ 0, flavours: Bitset, blend: Color _ NIL, index: INTEGER _ INTEGER.FIRST, used: BOOL _ FALSE, area: CARD _ 0]; colSubDef: BOOL; -- default for colour substitution traceColourInferences: BOOL; unColour: ImagerColor.RGB; blackBlack, orableBackground: Color; LayerColour: PROC [l: CD.Layer] RETURNS [Color]; SetLayerColourTable: PROC RETURNS [ok: BOOL _ TRUE]; ResetLayerColourTable: PROC RETURNS [ok: BOOL _ TRUE]; ColourTile: PROC [old: Blend, l: CD.Layer] RETURNS [new: Blend]; BlendTileColours: PROC; NumberOfColours: PROC RETURNS [INT]; DeclareColours: PROC [master: ImagerInterpress.Ref]; ListColourStatistics: PROC [numberOfTiles: CARD]; ResetColourStatistics: PROC; WriteMap: PROC [fileName: Rope.ROPE, msg: IO.STREAM _ NIL]; ReadMap: PROC [fileName: Rope.ROPE] END. °NectarineColors.mesa Copyright Σ 1987, 1988 by Xerox Corporation. All rights reserved. Giordano Bruno Beretta, June 24, 1987 9:16:35 am PDT gbb January 28, 1988 2:57:05 pm PST Inference engine for the colour registries and colour blending. Colouring single layers Ensure that only one colour representation is used. Infers a colour for every ChipnDale layer. Must be called whenever the user profile entry for the colour substitution changes. Colouring intersecting layers Adds a new layer to the set of layers intersecting in a tile. Blends colours for all tiles coloured with the above procedure. Number of different combinations of layers. This is the number of colours that the following procedure would declare in the Interpress master. Declares used colours in the preamble. Lists the surface statistics on the blended colour table in a terminal viewer. We initialize only the area so as to cache colour blendings across sessions. File Interface to MetaPalette Dumps the table of blended colours into a color map file. Loads the table of blended colours from a color map file. The file must have been written either by this module or by the MetaPalette; there is no consistency check. Κ”˜šœ™IcodešœB™BJšœ4™4K™#J™—K™?code2šΟk ˜ Kšœœ ˜Kšœœ ˜Kšœ œœ˜Kšœœ˜Kšœœœ˜Kšœœœ˜—šΠlnœœ œ˜*Lšœœ˜Lšœœœœœœœœœ˜>Kšœ œœ˜Kšœœœ ˜Kšœ œœ œ-œ œœœœœœ˜˜Lšœ œΟc"˜3Kšœœ˜Lšœœ˜Kšœ$˜$—headšœ™šΟn œœœœ ˜0K™3—š  œœœœœ˜4L™*—š  œœœœœ˜6JšœS™S——šœ™š  œœœœ˜@L™=—š œœ˜L™?—š œœœœ˜$L™Ž—š œœ ˜4L™&—š œœœ˜1K™N—š œœ˜K™L——™š  œœœœœœ˜;K™9—š œœœ˜#KšœCΟbœ^™₯——Lšœ˜—…—~ Β