ImagerHalftone.mesa
Michael Plass, July 11, 1983 3:56 pm
DIRECTORY
ImagerMasks, ImagerBasic, ImagerBrick
;
ImagerHalftone: CEDAR DEFINITIONS ~ BEGIN
Data types
Transformation: TYPE ~ ImagerBasic.Transformation;
PixelArray: TYPE ~ ImagerBasic.PixelArray;
PixelBuffer: TYPE ~ ImagerBasic.PixelBuffer;
Brick: TYPE ~ ImagerBrick.Brick;
Mask: TYPE ~ ImagerMasks.Mask;
DeviceBrick: TYPE ~ REF DeviceBrickRep;
DeviceBrickRep: TYPE ~ RECORD [
fMin, sMin: INTEGER,
fPeriod: NAT,
phase: NAT,
seq: SEQUENCE sPeriod: NAT OF PixelBuffer
];
Operations
MakeDeviceBrick: PROC [brick: Brick, maxPixelValue: CARDINAL] RETURNS [d: DeviceBrick];
Halftone: PROC [dest: Mask, mask: Mask, source: PixelArray, transformation: Transformation, deviceBrick: DeviceBrick];
The tranformation takes PixelArray space to device space: [x y 1] T = [s f 1].
DotScreen: PROC [x, y: REAL] RETURNS [fvalue: REAL];
LineScreen: PROC [x, y:REAL] RETURNS [fvalue: REAL];
END.