IIScanConverter.mesa
Copyright Ó 1984, 1985, 1986 by Xerox Corporation. All rights reserved.
Michael Plass, November 21, 1986 12:43:02 pm PST
Doug Wyatt, March 7, 1986 2:06:19 pm PST
DIRECTORY
IIPath USING [PathProc],
IISample USING [EdgeAction],
IITransformation USING [Transformation],
SF USING [Box, BoxAction, BoxGenerator, maxBox];
IIScanConverter: CEDAR DEFINITIONS
~ BEGIN
PathProc: TYPE ~ IIPath.PathProc;
Transformation: TYPE ~ IITransformation.Transformation;
Box: TYPE ~ SF.Box;
maxBox: Box ~ SF.maxBox;
BoxAction: TYPE ~ SF.BoxAction;
DevicePath: TYPE ~ REF DevicePathRep;
DevicePathRep: TYPE;
Create: PROC RETURNS [DevicePath];
SetPath: PROC [devicePath: DevicePath, path: PathProc, transformation: Transformation ← NIL, clipBox: Box ← maxBox];
CreatePath: PROC [path: PathProc,
transformation: Transformation ← NIL,
clipBox: Box ← maxBox,
scratch: DevicePath ← NIL -- for re-use of storage
] RETURNS [DevicePath];
BoundingBox: PROC [devicePath: DevicePath, clipBox: Box ← maxBox] RETURNS [Box];
A tight bounding box, clipped to clipBox.
NumberOfBoxes: PROC [devicePath: DevicePath] RETURNS [INT];
Guaranteed to be an upper bound, should be close to the actual.
Monotone: PROC [devicePath: DevicePath] RETURNS [BOOL];
Says whether the area is a monotone region, and hence subject to rapid scan conversion.
GenerateEdges: PROC [devicePath: DevicePath, edgeAction: IISample.EdgeAction];
Enumerates the edges, sorted by increasing sMin.
ConvertToBoxes: PROC [devicePath: DevicePath, oddWrap: BOOLFALSE,
clipBox: Box ← maxBox, boxAction: BoxAction];
ConvertToManhattanPolygon: PROC [devicePath: DevicePath, oddWrap: BOOLFALSE, clipBox: Box ← maxBox] RETURNS [LIST OF Box];
Satisfies assertion for an IIManhattan.Polygon.
ObjectsFromPath: PROC [path: PathProc, clipBox: Box, objectProc: PROC [Box, SF.BoxGenerator], devicePath: DevicePath];
Makes a separate call to objectProc for each trajectory of the path. The Box passed to objectProc is a bounding box for the trajectory, and the BoxGenerator generates the individual boxes.
END.