ImagerMask.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Michael Plass, May 16, 1985 12:15:42 pm PDT
Doug Wyatt, May 19, 1985 4:03:37 pm PDT
DIRECTORY
ImagerDevice USING [CharMask, DeviceBox, RunProc],
ImagerPixelMap USING [PixelMap, DeviceRectangle];
ImagerMask: CEDAR DEFINITIONS
~ BEGIN
CharMask: TYPE ~ ImagerDevice.CharMask;
RunProc: TYPE ~ ImagerDevice.RunProc;
DeviceBox: TYPE ~ ImagerDevice.DeviceBox;
PixelMap: TYPE ~ ImagerPixelMap.PixelMap;
DeviceRectangle: TYPE ~ ImagerPixelMap.DeviceRectangle;
RunsFromBitmap: PROC [bitmap: PixelMap, run: RunProc];
RunsFromBits: PROC [base: LONG POINTER, wordsPerLine: NAT, sBits, fBits, sSize, fSize: NAT, sRuns, fRuns: INTEGER, run: RunProc];
(sBits, fBits) is the min corner of the rectangle in the bitmap.
(sRuns, fRuns) is the min corner of the rectangle in the output coordinate system.
For each run, sMin IN [sRuns..sRuns+sSize) AND fMin IN [fRuns..fRuns+fSize)
RunsFromBox: PROC [box: DeviceBox, run: RunProc];
RunsFromRectangle: PROC [rect: DeviceRectangle, run: RunProc];
RunsFromCharMask: PROC [charMask: CharMask, run: RunProc, s, f: INTEGER,
clip: DeviceRectangle];
The origin of the character mask is at (s, f); all runs will lie within clip.
BitmapFromCharMask: PROC [charMask: CharMask] RETURNS [bitmap: PixelMap];
END.