DIRECTORY ImagerManhattan USING [Polygon], ImagerPixelArray USING [PixelArray], ImagerPixelMap USING [DeviceRectangle, Function, PixelMap, PixelMapRep, Tile], ImagerScanConverter USING [DevicePath], ImagerTransformation USING [Transformation]; ImagerMask: CEDAR DEFINITIONS ~ BEGIN DeviceRectangle: TYPE ~ ImagerPixelMap.DeviceRectangle; PixelMap: TYPE ~ ImagerPixelMap.PixelMap; PixelArray: TYPE ~ ImagerPixelArray.PixelArray; Tile: TYPE ~ ImagerPixelMap.Tile; Function: TYPE ~ ImagerPixelMap.Function; Transformation: TYPE ~ ImagerTransformation.Transformation; ManhattanPolygon: TYPE ~ ImagerManhattan.Polygon; DevicePath: TYPE ~ ImagerScanConverter.DevicePath; Mask: TYPE ~ REF; FromRectangle: PROC [box: DeviceRectangle] RETURNS [Mask]; FromManhattanPolygon: PROC [polygon: ManhattanPolygon] RETURNS [Mask] ~ INLINE { RETURN[polygon] }; FromBitmap: PROC [pixelMap: PixelMap] RETURNS [Mask]; FromDevicePath: PROC [devicePath: DevicePath] RETURNS [Mask] ~ INLINE { RETURN[devicePath] }; FromPixelArray: PROC [pixelArray: PixelArray, compositeTransformation: Transformation] RETURNS [Mask]; BoundingBox: PROC [mask: Mask] RETURNS [DeviceRectangle]; CountRuns: PROC [mask: Mask] RETURNS [numberOfRuns: INT]; GenerateRuns: PROC [mask, clipper: Mask, runProc: PROC [sMin, fMin: INTEGER, fSize: NAT], sTranslate, fTranslate: INTEGER _ 0]; ApplyTile: PROC [mask, clipper: Mask, dest: PixelMap, tile: Tile, function: Function _ [null, null], sTranslate, fTranslate: INTEGER _ 0]; ApplyConstant: PROC [mask, clipper: Mask, dest: PixelMap, value: CARDINAL, function: Function _ [null, null], sTranslate, fTranslate: INTEGER _ 0]; ToPixelMap: PROC [mask, clipper: Mask, sTranslate, fTranslate: INTEGER _ 0, scratch: REF ImagerPixelMap.PixelMapRep _ NIL] RETURNS [PixelMap]; ToManhattanPolygon: PROC [mask, clipper: Mask, sTranslate, fTranslate: INTEGER _ 0] RETURNS [ManhattanPolygon]; PixelArrayFromPixelMap: PROC [pixelMap: PixelMap] RETURNS [PixelArray]; END. ’ImagerMask.mesa Copyright c 1984, Xerox Corporation. All rights reserved. Michael Plass, February 8, 1984 10:45:46 am PST Doug Wyatt, October 10, 1984 4:04:51 pm PDT Provides device-resolution masks in a variety of representations. The coordinates are given in terms of s and f (for slow and fast). Data types Mask Creation Does not copy the list. Does not copy the bits. Must be one bit per pixel. Does not copy. Mask Data Extraction An upper bound. In order first by increasing sMin, then by increasing fMin. The mask is translated by [sTranslate, fTranslate] before generating runs. Causes copying. Causes copying. Does not copy the PixelMap Êœ˜™Jšœ Ïmœ/™:J™/J™+J™—™…J˜—šÏk ˜ Jšœžœ ˜ Jšœžœ˜$Jšœžœ:˜NJšœžœ˜'Jšœžœ˜,J˜—Jšœ ž˜šž˜J˜—™ J™Jšœžœ"˜7Jšœ žœ˜)Jšœ žœ˜/Jšœžœ˜!Jšœ žœ˜)Jšœžœ'˜;Jšœžœ˜1šœ žœ"˜2J˜—šœžœžœ˜J˜——™ J™šÏn œžœžœ˜:J˜—šŸœžœžœ˜EJšœžœžœ ˜J™J˜—šŸ œžœžœ˜5J™2J˜—šŸœžœžœ˜