DIRECTORY ColorTrixBasics, Imager, ImagerColorMap, ImagerColorOperator, ImagerPixelArray, ImagerPixelMap, InterminalBackdoor, Interpress, IO, Rope, Terminal; ColorTrixFile: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; PixelMap: TYPE ~ ColorTrixBasics.PixelMap; PixelMapMisc: TYPE ~ ColorTrixBasics.PixelMapMisc; DeviceRectangle: TYPE ~ ImagerPixelMap.DeviceRectangle; FileType: TYPE = {bad, ip, bw, color}; WritePmMiscToAIS: PROC [pmMisc: ColorTrixBasics.PixelMapMisc, name: ROPE]; ReadFile: PUBLIC PROC [ baseName: ROPE, aisX, aisY: CARDINAL _ 0, aisW, aisH: CARDINAL _ LAST[CARDINAL]] RETURNS [pmMisc: PixelMapMisc]; Read8BitFile: PUBLIC PROC [ name: ROPE, aisX, aisY: CARDINAL _ 0, aisW, aisH: CARDINAL _ LAST[CARDINAL]] RETURNS [pmMisc: PixelMapMisc]; Read24BitFile: PUBLIC PROC [ rName, gName, bName: ROPE, aisX, aisY: CARDINAL _ 0, aisW, aisH: CARDINAL _ LAST[CARDINAL]] RETURNS [pmMisc: PixelMapMisc]; ViewFile: PUBLIC PROC [ cd: PixelMapMisc, baseName: ROPE, center: BOOL _ FALSE, aisX, aisY: CARDINAL _ 0, aisW, aisH: CARDINAL _ LAST[CARDINAL]] RETURNS [error: ROPE _ NIL]; View8BitFile: PUBLIC PROC [ cd: PixelMap, name: ROPE, center: BOOL _ FALSE, aisX, aisY: CARDINAL _ 0, aisW, aisH: CARDINAL _ LAST[CARDINAL]] RETURNS [error: ROPE _ NIL]; View24BitFile: PUBLIC PROC [ cd: PixelMapMisc, rName, gName, bName: ROPE, center: BOOL _ FALSE, aisX, aisY: CARDINAL _ 0, aisW, aisH: CARDINAL _ LAST[CARDINAL]] RETURNS [error: ROPE _ NIL]; Display: PROC [ cd: Imager.Context, pa: ImagerPixelArray.PixelArray, op: ImagerColorOperator.ColorOperator]; ViewDitherFile: PROC [fileName: ROPE, cd: Imager.Context _ NIL, center, cmapInit: BOOL] RETURNS [error: ROPE _ NIL]; ViewGrayFile: PROC [fileName: ROPE, cd: Imager.Context _ NIL, center, cmapInit: BOOL] RETURNS [error: ROPE _ NIL]; ViewColorFiles: PROC [r, g, b: ROPE, cmapInit: BOOL _ TRUE] RETURNS [error: ROPE _ NIL]; LogError: Interpress.LogProc; OpenInterpress: PUBLIC PROC [name: ROPE] RETURNS [master: Interpress.Master]; ViewIpFile: PROC [name: ROPE, cmapInit: BOOL _ TRUE] RETURNS [error: ROPE _ NIL]; Parse: PROC [name: Rope.ROPE] RETURNS [type: FileType _ bad, name1, name2, name3: Rope.ROPE _ NIL]; END. ZColorTrixFile.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Bloomenthal, December 4, 1986 12:15:03 pm PST Procedures for reading/writing files to/from the color display. File Write Operations Write AIS file(s) from the given pixel map(s). Proper suffixes added to name. File Read Operations: Return a PixelMapMisc consisting of the named ais data. Return a PixelMapMisc consisting of the named ais data. Return a PixelMapMisc consisting of the rgb-named ais data. Viewing Procedures: View the named file according to suffix conventions. Display an 8-bit AIS file on the colordisplay; the image will be read according to aisX, aisY, aisW and aisH, and will be displayed according to cd's window. If center, the image is centered on the colordisplay. Display 3 8-bit AIS files as a 24 bit image; the image will be read according aisX, aisY, aisW and aisH, and will be displayed according to cd's window. If center, the image is centered on the colordisplay. Display the given pixel array centered in the given context. Display an 8-bit AIS file on the colordisplay using a dithered context. If center, the image is centered on the colordisplay. If cmapInit, the color map is initialized. Display an 8-bit AIS file on the colordisplay using a grayscale context. If center, the image is centered on the colordisplay. If cmapInit, the color map is initialized. Display a set of three AIS files on the colordisplay using a color-dither context. Interpress Operations Error proc for Interpress.DoPage. Display an Interpress file on the colordisplay using a color context; initialize cmap if cmapInit. Miscellany 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. Κ_˜šœ™Jšœ Οmœ1™