ImagerMaskCapture.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Michael Plass, May 16, 1985 3:46:51 pm PDT
Doug Wyatt, May 19, 1985 4:10:14 pm PDT
DIRECTORY
Imager USING [Context, Rectangle],
ImagerDevice USING [CharMask, RunProc],
ImagerManhattan USING [Polygon],
ImagerPixelMap USING [PixelMap],
ImagerTransformation USING [Transformation];
ImagerMaskCapture: CEDAR DEFINITIONS
~ BEGIN
Context: TYPE ~ Imager.Context;
Rectangle: TYPE ~ Imager.Rectangle;
Transformation: TYPE ~ ImagerTransformation.Transformation;
CharMask: TYPE ~ ImagerDevice.CharMask;
RunProc: TYPE ~ ImagerDevice.RunProc;
Manhattan: TYPE ~ ImagerManhattan.Polygon;
PixelMap: TYPE ~ ImagerPixelMap.PixelMap;
Capture: PROC [operator: PROC [Context], m: Transformation, r: REAL] RETURNS [CharMask];
m is the transformation to device coordinates, with x~s and y~f.
Returns NIL if the operator must be re-executed each time, and nothing can be said about the bounding box and/or width.
Returns uncached variant if the operator cannot be cached for some reason (including tryForMask=FALSE), but its bounding box and width are known.
Otherwise returns cached variant; raster IFF (size of raster rep) <= r*(size of runs rep).
The font and char fields of the result are not filled in.
CaptureBounds: PROC [operator: PROC [Context], m: Transformation] RETURNS [Rectangle];
Cant: SIGNAL [why: ATOM];
Raised by the following whenever a situation is detected where the result would not be well-defined;
CaptureRuns: PROC [operator: PROC [Context], m: Transformation, run: RunProc];
CaptureBitmap: PROC [operator: PROC [Context], m: Transformation] RETURNS [PixelMap];
CaptureManhattan: PROC [operator: PROC [Context], m: Transformation] RETURNS [Manhattan];
END.