Nectarine.mesa
Copyright Ó 1986, 1987 by Xerox Corporation. All rights reserved.
Giordano Bruno Beretta, April 11, 1986 7:57:41 pm PST
gbb December 3, 1987 10:45:03 am PST
Implements an alternate way to produce Interpress masters from ChipNDale drawings. The difference is in the user interface. It is similar to the one in programs by Imaging Folks, and it is simpler to use for casual users.
Fuzzless and sweeter than peaches (Suzanne Williams)
DIRECTORY
CD USING [Design, Layer, Rect, undefLayer],
Imager USING [Rectangle],
Rope USING [ROPE];
Nectarine: CEDAR DEFINITIONS
~ BEGIN
invalidPrinter, communicationsFailure, tooComplex: SIGNAL;
DoInterpress: PROC [design: CD.Design, chipNDaleWindow: CD.Rect, clip, onlySel, singleLayer: BOOLFALSE, layer: CD.Layer ← CD.undefLayer, lambda: REAL ← 0.0, firstPage, lastPage: BOOLTRUE, abortFlag: REF BOOL] RETURNS [masterName: Rope.ROPE, usedField: Imager.Rectangle];
Produces an Interpress master of the design. The master is scaled such that it fits a whole page. chipNDaleWindow is either the bounding box of the design or a window in it. In the latter case, clip must be set to TRUE, and objects completetly outside the window will be ommitted from the Interpress master (because of things like mitering, actual clipping can be performed only when a bitmap is created).
The usedField is specified in millimeters. It is useful for subsequent processing of the Interpress master as long as this field cannot be specified in the preamble of Interpress masters themselves.
If onlySel is true, only the selected object are included in the Interpress master.
If singleLayer is true, only objects in the layer layer are included in the Interpress master.
If lambda = 0 then scale such that the window fills the field, else scale such that 1  will be lambda mm in the Interpress master.
If not last page, the Interpress master is not closed, hence the next call of this procedure will add a page to the same master instead of creating a new document.
May return signal tooComplex if it is believed that there might be too many rectangles in a horizontal cross section. The used criterion is the width of the design; if you do not agree, use the Interpreter to increase the risk.
Print: PROC [masterName: Rope.ROPE, printerKey: ATOM, copies: INT ← 1, doNotScale: BOOLFALSE, sizeHint: REF Imager.Rectangle ← NIL, abortFlag: REF BOOL] RETURNS [peachName: Rope.ROPE]
Produces (if necessary) a PD file from an Interpress master and ships it to the printer. Valid printer keys are $NVersatec, $NColorVersatec, $NPeachExpand, $NBw400, $NColor400, $NRaven300, $NRaven384, $NPlateMaker. May return signals invalidPrinter.
If the image is in portrait format and the printer uses roll paper, the rectangle usedField from DoInterpress can be specified as a sizeHint to increase the scale so a to use the full roll width.
If doNotScale then Print does not fit the field to the medium.
END.
gbb September 5, 1986 11:02:07 am PDT
Added the parameter sizeHint to the print procedure.
changes to: Print
gbb February 2, 1987 6:00:10 pm PST
Added the capability to print at a given scale, i.e., to define  in millimetres
changes to: DoInterpress: added parameter lambda, Print: added parameter doNotScale.
gbb February 10, 1987 2:34:49 pm PST
Added a procedure to report the XNS printing status.
Added the ability to print only a single layer.
gbb December 3, 1987 10:44:22 am PST
Added abort flag to the print procedure
changes to: Print