ImagerColorDefs.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Doug Wyatt, April 15, 1985 2:27:01 pm PST
DIRECTORY
Atom USING [PropList],
ImagerPixelArrayDefs USING [PixelArray],
ImagerTransformation USING [Transformation];
ImagerColorDefs: CEDAR DEFINITIONS
~ BEGIN
Transformation:
TYPE ~ ImagerTransformation.Transformation;
PixelArray:
TYPE ~ ImagerPixelArrayDefs.PixelArray;
Color: TYPE ~ REF ColorRep;
ConstantColor: TYPE ~ REF ColorRep[constant];
SampledColor: TYPE ~ REF ColorRep[sampled];
ColorRep:
TYPE ~
RECORD [
propList: Atom.PropList ← NIL,
variant:
SELECT tag: *
FROM
constant => [
impl: REF ConstantColorImplRep, -- implementation data (if any) shared by all classes
class: REF ConstantColorClassRep, -- class operations
data: REF -- instance data
],
sampled => [
pa: PixelArray, -- the array of pixels
um: Transformation, -- transforms from color to device coordinates
colorOperator: ColorOperator -- maps pixels into colors
],
ENDCASE
];
ConstantColorImplRep: TYPE; -- see ImagerColorPrivate
ConstantColorClassRep:
TYPE;
-- see ImagerColorPrivate
ColorOperator: TYPE ~ REF ColorOperatorRep;
ColorOperatorRep:
TYPE ~
RECORD[
propList: Atom.PropList ← NIL,
samplesPerPixel: NAT,
impl: REF ColorOperatorImplRep, -- implementation data (if any) shared by all classes
class: REF ColorOperatorClassRep, -- class operations
data: REF -- instance data
];
ColorOperatorImplRep: TYPE; -- see ImagerColorOperatorPrivate
ColorOperatorClassRep:
TYPE;
-- see ImagerColorOperatorPrivate
END.