IIColorPrivate.mesa
Copyright © 1984, 1985, 1986 by Xerox Corporation. All rights reserved.
Doug Wyatt, March 6, 1986 10:04:46 pm PST
Michael Plass, September 5, 1986 11:36:32 am PDT
DIRECTORY
Atom USING [PropList],
IIColor USING [ColorOperator, ColorValueTriple, ConstantColor, Matrix3, SampleEncoding, Pixel3Encoding],
IIPixel USING [PixelBuffer, PixelMap, PixelProc],
IIPixelArray USING [PixelArray],
IISample USING [Function, Sample, SampleBuffer],
Rope USING [ROPE];
IIColorPrivate: CEDAR DEFINITIONS
~ BEGIN
ColorOperator: TYPE ~ IIColor.ColorOperator;
ConstantColor: TYPE ~ IIColor.ConstantColor;
Sample: TYPE ~ IISample.Sample;
SampleBuffer: TYPE ~ IISample.SampleBuffer;
SampleEncoding: TYPE ~ IIColor.SampleEncoding;
PixelBuffer: TYPE ~ IIPixel.PixelBuffer;
PixelArray: TYPE ~ IIPixelArray.PixelArray;
PixelMap: TYPE ~ IIPixel.PixelMap;
PixelProc: TYPE ~ IIPixel.PixelProc;
ROPE: TYPE ~ Rope.ROPE;
ColorOutput
ColorOutput: TYPE ~ REF ColorOutputRep;
ColorOutputRep: TYPE ~ RECORD [
type: ATOM,
samplesPerPixelOut: NAT,
impl: REF ColorOutputImplRep
];
ColorOutputImplRep: TYPE;
TupleProc: TYPE ~ PROC [i: NAT] RETURNS [REAL];
TranslateProc: TYPE ~ PROC [pixelsIn: PixelBuffer, pixelsOut: PixelBuffer];
A TranslateProc translates a sequence of pixels into the corresponding tuples
TupleFromPixel: PROC [self: ColorOperator, output: ColorOutput,
pixelIn: PixelProc, tupleAction: PROC [tupleOut: TupleProc]];
PixelFromPixel: PROC [self: ColorOperator, output: ColorOutput,
pixelIn: PixelProc, maxOut: PixelProc, pixelAction: PROC [pixelOut: PixelProc]];
TranslatePixels: PROC [self: ColorOperator, output: ColorOutput,
maxIn: PixelProc, maxOut: PixelProc, translateAction: PROC [translate: TranslateProc]];
Translate: PROC [self: ColorOperator, output: ColorOutput,
pa: PixelArray, maxOut: PixelProc] RETURNS [PixelMap];
TupleFromColor: PROC [self: ConstantColor, output: ColorOutput,
tupleAction: PROC [tupleOut: TupleProc]];
PixelFromColor: PROC [self: ConstantColor, output: ColorOutput,
maxOut: PixelProc, pixelAction: PROC [pixelOut: PixelProc]];
GrayFromColor: PROC [color: ConstantColor] RETURNS [REAL];
Returns Interpress-style gray, a fraction of absorptance from 0 (background) to 1 (black).
Function: TYPE ~ IISample.Function;
StippleData: TYPE ~ REF StippleDataRep;
StippleDataRep: TYPE ~ RECORD [word: WORD, function: Function];
ColorOperatorClass: TYPE ~ REF ColorOperatorClassRep; -- = ColorModel
ColorOperatorClassRep: TYPE ~ RECORD [
name: ROPE, -- hierarchical name of Interpress color model operator
TupleFromPixel: TupleFromPixelProc,
TranslatePixels: TranslatePixelsProc,
DataEqual: DataEqualProc
];
TupleFromPixelProc: TYPE ~ PROC [self: ColorOperator, output: ColorOutput,
pixelIn: PixelProc, tupleAction: PROC [tupleOut: TupleProc]];
TranslatePixelsProc: TYPE ~ PROC [self: ColorOperator, output: ColorOutput,
maxIn: PixelProc, maxOut: PixelProc, translateAction: PROC [translate: TranslateProc]];
DataEqualProc: TYPE ~ PROC [selfData, otherData: REF] RETURNS [BOOL];
NewColorOperatorClass: PROC [name: ROPE, TupleFromPixel: TupleFromPixelProc, TranslatePixels: TranslatePixelsProc, DataEqual: DataEqualProc] RETURNS [ColorOperatorClass];
NewColorOperator: PROC [chromatic: BOOL, samplesPerPixelIn: NAT, class: ColorOperatorClass, data: REF] RETURNS [ColorOperator];
DataGrayLinear: TYPE ~ REF DataGrayLinearRep;
DataGrayLinearRep: TYPE ~ RECORD [sWhite, sBlack: REAL, map: SampleEncoding];
DataGrayDensity: TYPE ~ REF DataGrayDensityRep;
DataGrayDensityRep: TYPE ~ RECORD [sWhite, sBlack, dBlack: REAL, map: SampleEncoding];
DataGrayVisual: TYPE ~ REF DataGrayVisualRep;
DataGrayVisualRep: TYPE ~ RECORD [sWhite, sBlack: REAL, map: SampleEncoding];
DataMap: TYPE ~ REF DataMapRep;
DataMapRep: TYPE ~ RECORD [v: SEQUENCE size: NAT OF ConstantColor];
DataBuildMap: TYPE ~ REF DataBuildMapRep;
DataBuildMapRep: TYPE ~ RECORD [
colorOperator: ColorOperator,
v: SEQUENCE size: NAT OF Sample
];
DataCalibrated: TYPE ~ REF DataCalibratedRep;
DataCalibratedRep: TYPE ~ RECORD [
encoding: IIColor.Pixel3Encoding,
matrix: IIColor.Matrix3,
hints: Atom.PropList
];
MaxInRep: TYPE ~ RECORD [maxIn: Sample];
DataRGB: TYPE ~ REF DataRGBRep;
DataRGBRep: TYPE ~ MaxInRep;
DataCMY: TYPE ~ REF DataCMYRep;
DataCMYRep: TYPE ~ MaxInRep;
DataCMYK: TYPE ~ REF DataCMYKRep;
DataCMYKRep: TYPE ~ MaxInRep;
DataColorMap: TYPE ~ REF DataColorMapRep;
DataColorMapRep: TYPE ~ RECORD [SEQUENCE size: NAT OF IIColor.ColorValueTriple];
END.