PDInterpOutputScreenImpl.mesa
Michael Plass, November 28, 1983 4:26 pm
DIRECTORY BitBlt, Environment, PDFileFormat, PDInterpBasic, PDInterpOutput, PDInterpBitmap, UserTerminal;
PDInterpOutputScreenImpl:
PROGRAM
IMPORTS PDInterpBitmap, UserTerminal
EXPORTS PDInterpOutput
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.