DIRECTORY IO USING [STREAM], PDFileFormat USING [Herald, Run, StartImage], PDInterpBasic USING [PDErrorCode, PDWarningCode, Status], PDInterpBitmap USING [BitmapDesc, Tile]; PDInterpReader: DEFINITIONS = BEGIN Handle: TYPE = LONG POINTER TO Rep; Rep: TYPE = RECORD [ stream: IO.STREAM, herald: PDFileFormat.Herald, image: PDFileFormat.StartImage, bandNumber: CARDINAL, sMinBand: CARDINAL, sSizeBand: CARDINAL, colorType: ColorType, colorTileLoadAddress: INT, priority: INT, loadWords: INT, private: LONG POINTER TO PrivateRep, index: INT, page: INT, pass: INT, status: PDInterpBasic.Status, warningCount: INT ]; ColorType: TYPE = {none, clear, ink, opaqueTile, transparentTile}; PrivateRep: TYPE; ColorTileFromLoad: PROC [handle: Handle, colorTileLoadAddress: INT, scratchPointer: LONG POINTER _ NIL, scratchWords: INT _ 0] RETURNS [PDInterpBitmap.Tile]; Error: ERROR [handle: Handle, code: PDInterpBasic.PDErrorCode, wordIndex, wordCount: INT]; Warning: SIGNAL [handle: Handle, code: PDInterpBasic.PDWarningCode, wordIndex, wordCount: INT]; Open: PROC [stream: IO.STREAM] RETURNS [Handle]; Close: PROC [handle: Handle] RETURNS [stream: IO.STREAM]; Get: PROC [handle: Handle] RETURNS [CommandBuffer]; CommandBuffer: TYPE = RECORD [ SELECT cmd: * FROM maskRectangle => [ sMin, fMin, sSize, fSize: CARDINAL ], maskTrapezoid => [ sMin, fMin, fMinLast, sSize, fSize, fSizeLast: CARDINAL ], maskRunGroup => [ sMin, fMin, sSize, fSize: CARDINAL, fOffset: CARDINAL, -- add this to fMin of each run runCount: INT, -- number of runs pointer: LONG POINTER TO PDFileFormat.Run, loadAddress: INT -- -1 if not in the load ], maskSamples => [ loadAddress: INT, -- -1 if not in the load samples: PDInterpBitmap.BitmapDesc ], colorSamples => [ samples: PDInterpBitmap.BitmapDesc ], deviceCommand => [ deviceCommandPointer: LONG POINTER, deviceCommandWords: CARDINAL ], stateChange => [ whatChanged: WhatChanged, loadChangeStart, loadChangeLength: INT ], ENDCASE ]; WhatChanged: TYPE = { imageStart, imageEnd, priorityChange, colorChange, bandChange, loadChange, documentEnd }; END. PDInterpReader.mesa Copyright (C) 1983, 1985, Xerox Corporation. All rights reserved. Michael Plass, September 4, 1984 9:51:32 am PDT Last Edited by: Pier, November 22, 1983 2:44 pm Tim Diebert: September 19, 1985 2:44:50 pm PDT Handle definition Color Tile access: Errors and Signals File control May raise PDFileReader.Error or PDFileReader.Warning Assumes the stream is positioned at the start of a PD file. Doesa NOT close the stream. Reading operations May raise PDFileReader.Error or PDFileReader.Warning Κ‰˜codešœ™K™BK™/K™/K™.—K˜šΟk ˜ Kšœœœ˜Kšœ œ˜-Kšœœ&˜9Kšœœ˜(K˜—šΟnœ œ˜#K™™Kš œœœœœ˜#šœœœ˜Kšœœœ˜Kšœ˜Kšœ˜Kšœ œ˜Kšœ œ˜Kšœ œ˜K˜Kšœœ˜Kšœ œ˜Kšœ œ˜Kšœ œœœ ˜$Kšœœ˜ Kšœœ˜ Kšœœ˜ K˜Kšœ˜Kšœ˜K˜—Kšœ œ3˜BKšœ œ˜K˜—™Kšžœœ(œœœœœœ˜K˜—™KšžœœIœ˜ZKšžœœKœ˜_K˜—™ š žœœ œœœ ˜0Kšœ4™4K™;—š žœœœ œœ˜9K™—K˜—™šžœœœ˜3Kšœ4™4—K˜—šœœœ˜šœ˜šœ˜Kšœ˜"Kšœ˜—šœ˜Kšœ/˜7Kšœ˜—šœ˜Kšœœ˜#Kšœ œΟc˜2Kšœ œŸ˜ Kšœ œœœ˜*Kšœ œŸ˜)Kšœ˜—šœ˜Kšœ œŸ˜*Kšœ"˜"Kšœ˜—šœ˜Kšœ"˜"Kšœ˜—šœ˜Kšœœœ˜#Kšœ˜Kšœ˜—šœ˜Kšœ˜Kšœ#˜&Kšœ˜—Kš˜—Kšœ˜šœ œ˜KšœV˜VKšœ˜—K˜—Kšœ˜——…— ­