<> <> DIRECTORY BitBlt, Environment, PDFileFormat, PDInterpBasic, PDInterpOutput, PDInterpBitmap, UserTerminal; PDInterpOutputScreenImpl: PROGRAM IMPORTS PDInterpBitmap, UserTerminal EXPORTS PDInterpOutput = BEGIN currentHerald: PDFileFormat.Herald; currentStartImage: PDFileFormat.StartImage; currentBandNumber: NAT _ 0; screen: PDInterpBitmap.BitmapDesc _ ScreenDesc[]; ScreenDesc: PROC RETURNS [display: PDInterpBitmap.BitmapDesc] = { bb: BitBlt.BBTable; [] _ UserTerminal.SetState[on]; bb _ UserTerminal.GetBitBltTable[]; display _ [sOrigin: 0, fOrigin: 0, sMin: 0, fMin: 0, sSize: bb.height, fSize: bb.width, pointer: bb.dst.word, rast: bb.width/Environment.bitsPerWord, lines: bb.height ]; display _ display.ShiftMap[-18, -1]; display _ display.Clip[[0, 0, 720, 598]]; PDInterpBitmap.Fill[display, [0,0,10000,10000], 1]; display.sOrigin _ display.sOrigin + 384; display.fOrigin _ display.fOrigin + 384; }; CurrentBandDesc: PROC RETURNS [bitmapDesc: PDInterpBitmap.BitmapDesc] = { rectangle: PDInterpBitmap.Rectangle _ [ sMin: currentHerald.bandSSize*(currentBandNumber+currentStartImage.passBands), fMin: currentStartImage.fMinPage, sSize: currentHerald.bandSSize, fSize: currentStartImage.fSizePage ]; bitmapDesc _ screen.Clip[rectangle]; PDInterpBitmap.Fill[bitmapDesc, rectangle, 0]; }; StartImage: PUBLIC PROC [herald: PDFileFormat.Herald, startImage: PDFileFormat.StartImage] RETURNS [PDInterpBitmap.BitmapDesc] = { currentHerald _ herald; currentStartImage _ startImage; currentBandNumber _ 0; RETURN [CurrentBandDesc[]] }; <<>> EndBand: PUBLIC PROC RETURNS [PDInterpBitmap.BitmapDesc] = { currentBandNumber _ currentBandNumber + 1; RETURN [CurrentBandDesc[]] }; EndImage: PUBLIC PROC = {}; END.