<> <> <> <> <<>> <> <> DIRECTORY ImagerPixelMap USING [DeviceRectangle]; ImagerManhattan: CEDAR DEFINITIONS ~ BEGIN <> DeviceRectangle: TYPE ~ ImagerPixelMap.DeviceRectangle; <> Polygon: TYPE ~ LIST OF DeviceRectangle; <> <> <> <> Validate: PROC [polygon: Polygon] RETURNS [Polygon]; <> <<>> InvalidManhattanPolygon: ERROR; <> <> CreateFromRuns: PROC [ runs: PROC[ -- Create calls this back run: PROC[sMin, fMin: INTEGER, fSize: NAT], -- client calls this from inside runs. repeat: PROC[timesToRepeatScanline: NAT] -- client calls this to repeat a scanline ] ] RETURNS [Polygon]; <> CreateFromBox: PROC [deviceRectangle: DeviceRectangle] RETURNS [Polygon]; <> Destroy: PROC [rectangleList: LIST OF DeviceRectangle]; <> <> Copy: PROC [polygon: Polygon] RETURNS [Polygon]; Union: PROC [a, b: Polygon] RETURNS [Polygon]; Intersection: PROC [a, b: Polygon] RETURNS [Polygon]; Difference: PROC [a, b: Polygon] RETURNS [Polygon]; <> Shift: PROC [polygon: Polygon, sShift, fShift: INTEGER]; Canonicalize: PROC [rectangleList: LIST OF DeviceRectangle] RETURNS [Polygon]; <> <> BoundingBox: PROC [polygon: Polygon] RETURNS [DeviceRectangle]; CountBoxes: PROC [polygon: Polygon] RETURNS [INT]; CountRuns: PROC [polygon: Polygon] RETURNS [INT]; MapRuns: PROC [polygon: Polygon, run: PROC [sMin, fMin: INTEGER, fSize: NAT]]; Visibility: TYPE ~ {visible, partlyVisible, invisible}; IsVisible: PROC [mask, clipper: Polygon] RETURNS [Visibility]; <