ColorPatch.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Written by: Maureen Stone August 15, 1985 10:12:32 pm PDT
Avi Naiman, September 8, 1985 7:47:13 pm PDT
DIRECTORY
Imager USING [Box],
ViewerClasses USING [Viewer],
ImagerColor USING [RGB, HSV, HSL, YIQ],
CNSColor USING [CSLChroma, CSLSaturation, CSLLightness, red, vivid, medium],
ImagerColorMap USING [MapEntry];
ColorPatch: CEDAR DEFINITIONS
~ BEGIN
Viewer: TYPE = ViewerClasses.Viewer;
ColorPatchViewer: TYPE = Viewer;
MakeColorPatch: PROCEDURE[parent: Viewer, wx, wy, width, height: CARDINAL] RETURNS[ColorPatchViewer];
InterpolationType: TYPE = {left, right, stop, off};
ColorPatchData: TYPE = REF ColorPatchDataRec;
ColorPatchDataRec: TYPE = RECORD [
box: Imager.Box,
patchMapEntry: ImagerColorMap.MapEntry ← [mapIndex: 100, red: 0, green: 0, blue: 0],
rgbContrastMapEntry: ImagerColorMap.MapEntry ← [mapIndex: 99, red: 0, green: 0, blue: 0],
hsvContrastMapEntry: ImagerColorMap.MapEntry ← [mapIndex: 98, red: 0, green: 0, blue: 0],
hslContrastMapEntry: ImagerColorMap.MapEntry ← [mapIndex: 97, red: 0, green: 0, blue: 0],
yiqContrastMapEntry: ImagerColorMap.MapEntry ← [mapIndex: 96, red: 0, green: 0, blue: 0],
argybContrastMapEntry: ImagerColorMap.MapEntry ← [mapIndex: 95, red: 0, green: 0, blue: 0],
leftInterpolateMapEntry: ImagerColorMap.MapEntry ← [mapIndex: 94, red: 255, green: 255, blue: 255],
rightInterpolateMapEntry: ImagerColorMap.MapEntry ← [mapIndex: 77, red: 255, green: 255, blue: 255],
separate: BOOLEANFALSE,
dither: BOOLEANFALSE, -- dither=TRUE means that half of the color patch is dithered
consistencyCheck: BOOLEANFALSE, -- consistencyCheck=TRUE means that the color space which is being modified is checked for consistency with the computed RGB values
rgbContrast, hsvContrast, hslContrast, yiqContrast, argybContrast: BOOLEANFALSE, -- xxxContrast=TRUE means that the contrasting patch for xxx is visible
interpolationRequest: InterpolationType ← off, -- off: interpolation bar invisible; left: track left side of interpolation bar; right: track right side of interpolation bar; stop: stop tracking color patch
leftInterpolateColor: ImagerColor.RGB ← [1,1,1],
rightInterpolateColor: ImagerColor.RGB ← [1,1,1],
rgb: ImagerColor.RGB ← [0,0,0],
hsv: ImagerColor.HSV ← [0,0,0],
hsl: ImagerColor.HSL ← [0,0,0],
yiq: ImagerColor.YIQ ← [0,0,0],
argybA: REAL ← 0.0,
argybRg: REAL ← 0.0,
argybYb: REAL ← 0.0,
cslC: CNSColor.CSLChroma ← CNSColor.red,
cslS: CNSColor.CSLSaturation ← CNSColor.vivid,
cslL: CNSColor.CSLLightness ← CNSColor.medium
];
END.