<> <> <> <> <> <<>> DIRECTORY ImagerPixelMap USING [PixelMap, PixelMapRep, Tile], IO USING [STREAM], PDFileFormat USING [Herald, Run, StartImage], Rope USING [ROPE]; PDFileReader: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; <> Handle: TYPE ~ REF Rep; Rep: TYPE ~ RECORD [ herald: PDFileFormat.Herald, image: PDFileFormat.StartImage, bandNumber: CARDINAL, sMinBand: CARDINAL, sSizeBand: CARDINAL, colorType: ColorType, colorTileLoadAddress: INT, priority: INT, loadWords: INT, private: REF, stream: IO.STREAM, warningCount: INT ]; ColorType: TYPE ~ {none, clear, ink, opaqueTile, transparentTile}; <> Error: ERROR [handle: Handle, code: ErrorCode, wordIndex, wordCount: INT, description: ROPE]; <> Warning: SIGNAL [handle: Handle, code: ErrorCode, wordIndex, wordCount: INT, description: ROPE]; ErrorCode: TYPE ~ { <> invalidPassword, objectOutOfBounds, missingStartImage, badLoadReference, unrecognisedImagingCommand, loadOutOfBounds, unrecognisedControlCommand, unrecognisedCommandType, unexpectedEOF, <> wrongFormatVersion, unreasonableResolution, unreasonableBandSSize, unreasonableImageSize, unreasonableLoadSize, unreasonableNumberOfCopies, objectOutOfBand, emptyRunGroup, nonZeroFill, imageBoundsExceedPageBounds, tooFewBands, unknownColorTileFlag }; <> Open: PROC [fileName: ROPE] RETURNS [Handle]; <> FromStream: PROC [stream: IO.STREAM] RETURNS [Handle]; <> Close: PROC [handle: Handle]; <> Get: PROC [handle: Handle, scanning: BOOLEAN _ FALSE] RETURNS [REF]; <> <> <> Keep: PROC [handle: Handle, ref: REF] RETURNS [REF]; <> ColorTileFromLoad: PROC [handle: Handle, colorTileLoadAddress: INT, scratch: REF ImagerPixelMap.PixelMapRep _ NIL] RETURNS [colorTile: ImagerPixelMap.Tile]; <> MaskRectangle: TYPE ~ REF MaskRectangleRep; MaskRectangleRep: TYPE ~ RECORD [ sMin, fMin, sSize, fSize: CARDINAL ]; MaskTrapezoid: TYPE ~ REF MaskTrapezoidRep; MaskTrapezoidRep: TYPE ~ RECORD [ sMin, fMin, fMinLast, sSize, fSize, fSizeLast: CARDINAL ]; MaskRunGroup: TYPE ~ REF MaskRunGroupRep; MaskRunGroupRep: TYPE ~ RECORD [ 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 ref: REF -- for garbage collection hacks ]; MaskSamples: TYPE ~ REF MaskSamplesRep; MaskSamplesRep: TYPE ~ RECORD [ loadAddress: INT, -- -1 if not in the load samples: ImagerPixelMap.PixelMap ]; ColorSamples: TYPE ~ REF ColorSamplesRep; ColorSamplesRep: TYPE ~ RECORD [ samples: ImagerPixelMap.PixelMap ]; DeviceCommand: TYPE ~ REF DeviceCommandRep; DeviceCommandRep: TYPE ~ RECORD [ SEQUENCE wordCount: NAT OF CARDINAL ]; StateChange: TYPE ~ REF StateChangeRep; StateChangeRep: TYPE ~ RECORD [ whatChanged: WhatChanged, loadChangeStart, loadChangeLength: INT ]; WhatChanged: TYPE ~ { imageStart, imageEnd, priorityChange, colorChange, bandChange, loadChange, documentEnd }; END.