ColorTrixFile.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Bloomenthal, May 13, 1986 6:17:04 pm PDT
Procedures for reading/writing files to/from the color display.
DIRECTORY Imager, ImagerColorMap, ImagerColorOperator, ImagerPixelArray, InterminalBackdoor, Interpress, IO, Rope, Terminal;
ColorTrixFile: CEDAR DEFINITIONS
~ {
FileType: TYPE = {bad, ip, bw, color};
OpenInterpress: PUBLIC PROC [name: Rope.ROPE] RETURNS [master: Interpress.OpenMaster];
Parse: PROC [name: Rope.ROPE] RETURNS [type: FileType ← bad, name1, name2, name3: Rope.ROPENIL];
Parse input filename to determine type of file (bad, ip, bw, or color) even if filename has no extension; name1 is returned with proper extension; if file type is color, then name1, name2, and name3 are names of red, green, and blue ais files.
ViewIpFile: PROC [name: Rope.ROPE, cmapInit: BOOLTRUE]
RETURNS [BOOLTRUE];
Display an Interpress file on the colordisplay using a color context; initialize cmap if cmapInit.
     
ViewGrayFile: PROC [name: Rope.ROPE, cd: Imager.Context ← NIL, cmapInit: BOOLTRUE]
RETURNS [BOOLTRUE];
Display an 8-bit AIS file on the colordisplay using a grayscale context.
     
ViewDitherFile: PROC [name: Rope.ROPE, cd: Imager.Context ← NIL, cmapInit: BOOLTRUE]
RETURNS [BOOLTRUE];
Display an 8-bit AIS file on the colordisplay using a dithered context.
     
ViewColorFiles: PROC [r, g, b: Rope.ROPE, cmapInit: BOOLTRUE]
RETURNS [ok: BOOLTRUE];
Display a set of three AIS files on the colordisplay using a color-dither context.
Display: PROC [cd: Imager.Context, pa: ImagerPixelArray.PixelArray, op: ImagerColorOperator.ColorOperator];
Display the given pixel array centered in the given context.
}.