NectarineColors.mesa
Copyright Ó 1987, 1988 by Xerox Corporation. All rights reserved.
Giordano Bruno Beretta, June 24, 1987 9:16:35 am PDT
gbb January 29, 1988 7:39:42 pm PST
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;
Colouring intersecting layers
ColourTile:
PROC [old: Blend, l:
CD.Layer]
RETURNS [new: Blend];
Adds a new layer to the set of layers intersecting in a tile.
BlendTileColours:
PROC;
Blends colours for all tiles coloured with the above procedure.
NumberOfColours:
PROC
RETURNS [
INT];
Number of different combinations of layers. This is the number of colours that the following procedure would declare in the Interpress master.
DeclareColours:
PROC [master: ImagerInterpress.Ref];
Declares used colours in the preamble.
IthColour:
PROC [i:
INT]
RETURNS [Color];
Returns the i-th color.
ListColourStatistics:
PROC [numberOfTiles:
CARD];
Lists the surface statistics on the blended colour table in a terminal viewer.
ResetColourStatistics:
PROC;
We initialize only the area so as to cache colour blendings across sessions.