DIRECTORY ImagerPixelMap USING [PixelMap], PDFileReader USING [Handle, WhatChanged], ViewerClasses USING [Viewer]; PDImageReader: CEDAR DEFINITIONS = BEGIN Handle: TYPE=REF Rep; Rep: TYPE = RECORD [ pixelMap: ImagerPixelMap.PixelMap ]; ImageLink: TYPE = REF ImageRep; ImageRep: TYPE = RECORD [ link: ImageLink, --NIL => end of list type: PDFileReader.WhatChanged, --imageStart or loadChange imageNumber: INT, -- -1 if loadChange index: INT --index in PD file of the startImage or storeLoad command ]; PaintActionProc: TYPE = PROC [self: ViewerClasses.Viewer, whatChanged: REF ANY]; InterpretImage: PROC [handle: PDFileReader.Handle, viewer: ViewerClasses.Viewer, paintAction: PaintActionProc] RETURNS [lastImage: BOOLEAN _ FALSE]; GetPageStructure: PROCEDURE [handle: PDFileReader.Handle] RETURNS [list: ImageLink, imageCount: INT]; ResetToImage: PROCEDURE [pdData: REF ANY] RETURNS [ImageLink]; END. PDImageReader.mesa Last edited by Ken Pier, September 18, 1985 11:52:59 am PDT Interprets one image in a PDFile. Must be called ONLY AFTER the desired image has been selected by a call to ResetToImage. May raise PDFileReader.Warning or PDFileReader.Error or PDReaderOutput.Error or PDReaderOutput.Abort Returns TRUE if the interpreted image is the last image in the document. Assumes filestream is available from Handle and Gets can be executed safely. Scans the PD file and returns a linked list of records (ImageReps) which contain the indexes in the file of imageStart or loadChange commands. Allows a client to skip thru the file to a particular image, building the load for that image as needed. The total number of images is also returned. A routine to reconstruct the load for the image number in pdData.pageNumber. In this case, pdData.pageNumber contains an image number rather than a page number. pdData MUST BE a Preview.PDData. It has type REF ANY to avoid circular recompilation dependencies between this module and PreView.mesa. Requires that a page structure has already been built using GetPageStructure and stored in pdData.pageStructure. Returns an ImageLink (single element) for the page that has been successfully reset to. Returns NIL if pageNumber is not in the images list. Κ‘˜Jšœ™J™;J˜šΟk ˜ Jšœœœ&œ ˜h—unitšΟn œœ œ˜(J˜Jšœœœ˜šœœœ˜Jšœ!˜!J˜—Jšœ œœ ˜šœ œœ˜JšœΟc˜%Jšœ Ÿ˜:Jšœ œŸ˜%JšœœŸ9˜DJ˜—J˜š žœœœ+œœ˜PJ˜—šžœœ[œ œ˜”J™{Jšœd™dJ™HJ˜—šžœ œœœ˜eJšœL™LJ™\JšœŸœ0™WJ™oJ™—š ž œ œ œœœ ˜>Jšœͺ™ͺJšœL™LJšœ°™°—J™—Jšœ˜J˜—…—Œ 9