ImagerMask.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Michael Plass, May 16, 1985 12:15:42 pm PDT
Doug Wyatt, March 7, 1986 2:57:21 pm PST
DIRECTORY
ImagerDevice USING [CharMask],
ImagerSample USING [SampleMap],
SF USING [Box, BoxAction, BoxGenerator, Vec];
ImagerMask: CEDAR DEFINITIONS
~
BEGIN
Box: TYPE ~ SF.Box;
BoxAction: TYPE ~ SF.BoxAction;
BoxGenerator: TYPE ~ SF.BoxGenerator;
CharMask: TYPE ~ ImagerDevice.CharMask;
SampleMap: TYPE ~ ImagerSample.SampleMap;
RunProc:
TYPE ~
PROC [min:
SF.Vec, count:
NAT];
BoxesFromBitmap:
PROC [bitmap: SampleMap, boxAction: BoxAction];
BoxesFromBits:
PROC [base:
LONG
POINTER, wordsPerLine:
NAT, sBits, fBits, sSize, fSize:
NAT, sRuns, fRuns:
INTEGER, boxAction: BoxAction];
(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)
RunsFromBoxes:
PROC [boxes: BoxGenerator, run: RunProc];
RunsFromCharMask:
PROC [charMask: CharMask, run: RunProc, s, f:
INTEGER, clip: Box];
The origin of the character mask is at (s, f); all runs will lie within clip.
BitmapFromCharMask:
PROC [charMask: CharMask]
RETURNS [bitmap: SampleMap];
END.