<> <> <<>> DIRECTORY PDInterpBasic, PDFileFormat, PDInterpBitmap, PDInterpInput; PDInterpReader: DEFINITIONS = BEGIN <> Handle: TYPE = LONG POINTER TO Rep; Rep: TYPE = RECORD [ herald: PDFileFormat.Herald, image: PDFileFormat.StartImage, bandNumber: CARDINAL, sMinBand: CARDINAL, sSizeBand: CARDINAL, colorType: ColorType, colorTileLoadAddress: INT, priority: INT, loadPointer: LONG POINTER, loadWords: INT, private: LONG POINTER TO PrivateRep, input: PDInterpInput.Handle, index: INT, page: INT, pass: INT, 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 [input: PDInterpInput.Handle] RETURNS [Handle]; <> Close: PROC [handle: Handle] RETURNS [Handle _ NIL]; <> 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.