--BandsClient.mesa
--Last Edited by Pier, October 26, 1982 12:42 pm
-- Last edited by Eric Bier on October 26, 1982 1:14 pm

DIRECTORY

CGDevice,
CGBandDevice,
Graphics,
Rope;

BandsClient: DEFINITIONS = {

Device: TYPE = CGDevice.Ref;
DeviceType: TYPE = CGBandDevice.BandDevice;
Separation: TYPE = CGBandDevice.Separation;

-- Instructions: SetUpBrick or SetUpSeparation. Then get a Graphics.Context from OpenBands. Draw on it to your heart's content. Close it with CloseBands. A file named BANDS will be produced representing what you drew in a printer dependant way. Pass OpenBands either "hornet", "platemaker" or "screen" to indicate intended printing device.

SetUpBrick: PROC [freq: REAL, angle: REAL, filter: PROC[x,y:REAL] RETURNS [fvalue: REAL]];
SetUpSeparation: PROC [s: Separation, filter: PROC[x,y:REAL] RETURNS [fvalue: REAL]];
-- builds a brick of frequency 10 and angle dependent on separation. (75 degrees for red, 105 degrees for green, and 90 degrees for blue). This choice of angles helps get rid of moray patterns and promotes better color mixing (for instance using the cromalin color printing process).
OpenBands: PROC[DeviceType]
RETURNS [dc: Graphics.Context, device: Device];
CloseBands: PROC[device: Device, bandD: DeviceType];
-- CloseBands does a ConcatBands automatically for the appropriate DeviceType.

CloseBandsNoConcat: PROC[device: Device, bandD: DeviceType];
-- like CloseBands but does not concatenate the PBand.* files created so no BANDS is produced. (Interim solution to the fact that platemaker files can take over 16,000 pages - Eric Bier)

ConcatBands: PROC[bandD: DeviceType];

AISBands: PROC [x, y: REAL, aisName: Rope.ROPE, bandD: DeviceType, s: Separation];
-- Convenience function. Makes file BANDS with picture as though you had run Graphics.MoveTo[dc, x, y] and Graphics.DrawImage onto a Graphics.Context containing a device of DeviceType.

AISBandsNoConcat: PROC [x, y: REAL, aisName: Rope.ROPE, bandD: DeviceType, s: Separation];
-- Like AISBands but does not concatenate the PBand.* files created so no BANDS is produced. (Interim solution to the fact that platemaker files can take over 16,000 pages - Eric Bier)


}.