ImagerMaskCapture.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Michael Plass, May 16, 1985 3:46:51 pm PDT
Doug Wyatt, March 7, 1986 2:59:58 pm PST
DIRECTORY
Imager USING [Context],
ImagerBasics USING [Rectangle],
ImagerDevice USING [CharMask],
ImagerManhattan USING [Polygon],
ImagerSample USING [SampleMap],
ImagerTransformation USING [Transformation],
SF USING [BoxAction];
ImagerMaskCapture: CEDAR DEFINITIONS
~ BEGIN
Context: TYPE ~ Imager.Context;
Rectangle: TYPE ~ ImagerBasics.Rectangle;
Transformation: TYPE ~ ImagerTransformation.Transformation;
CharMask: TYPE ~ ImagerDevice.CharMask;
Manhattan: TYPE ~ ImagerManhattan.Polygon;
SampleMap: TYPE ~ ImagerSample.SampleMap;
BoxAction: TYPE ~ SF.BoxAction;
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;
CaptureBoxes: PROC [operator: PROC [Context], m: Transformation, boxAction: BoxAction];
CaptureBitmap: PROC [operator: PROC [Context], m: Transformation] RETURNS [SampleMap];
CaptureManhattan: PROC [operator: PROC [Context], m: Transformation] RETURNS [Manhattan];
END.