DIRECTORY Imager USING [Color, ColorOperator, Context, Font, PixelArray, Transformation], IO USING [STREAM], Rope USING [ROPE]; ImagerInterpressPreamble: CEDAR DEFINITIONS ~ BEGIN Ref: TYPE ~ REF Rep; Rep: TYPE; Create: PROC [fileName: Rope.ROPE, header: Rope.ROPE _ NIL] RETURNS [Ref]; CreateFromStream: PROC [stream: IO.STREAM, header: Rope.ROPE] RETURNS [Ref]; DeclareFont: PROC [self: Ref, font: Imager.Font]; DeclareColor: PROC [self: Ref, color: Imager.Color]; DeclarePixelArray: PROC [self: Ref, pixelArray: Imager.PixelArray]; DeclareColorOperator: PROC [self: Ref, colorOperator: Imager.ColorOperator]; DeclareIdentifier: PROC [self: Ref, identifier: ATOM]; PushInt: PROC [self: Ref, n: INT]; VectorProc: TYPE ~ PROC [ putIdentifier: PROC [ATOM], putString: PROC [Rope.ROPE], putInt: PROC [INT], putReal: PROC [REAL], putTransformation: PROC [Imager.Transformation], putVector: PROC [vecProc: PROC], putImageOp: PROC [action: PROC [Imager.Context]] ]; PushVector: PROC [self: Ref, vectorProc: VectorProc]; PushPixelArray: PROC [self: Ref, pa: Imager.PixelArray]; PushColorOperator: PROC [self: Ref, op: Imager.ColorOperator]; DoPage: PROC [self: Ref, action: PROC [Imager.Context], scale: REAL _ 1.0]; Close: PROC [self: Ref]; Finish: PROC [self: Ref]; GetContext: PROC [self: Ref] RETURNS [Imager.Context]; NewPage: PROC [self: Ref, context: Imager.Context, last: BOOL]; END. "ImagerInterpressPreamble.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Doug Wyatt, October 18, 1985 6:21:01 pm PDT Michael Plass, April 8, 1986 12:33:42 pm PST Rick Beach, June 17, 1986 4:33:07 pm PDT Imager clients can use this interface to create Interpress masters. Creates a file with the given name. If header=NIL, a header of "Interpress/Xerox/3.0 " is supplied. Returns a handle aimed at stream; header is inserted verbatim at beginning. Includes a Font in the preamble. Includes a Color in the preamble. Includes a PixelArray in the preamble. Includes a ColorOperator in the preamble. Includes an identifier in the preamble. Pushes an integer on the stack created in the preamble. Pushes a vector on the stack created in the preamble. vectorProc should not call PushVector, but should use its putVector proc to create any nested vectors. Pushes a pixel array on the stack created in the preamble. Pushes a color operator on the stack created in the preamble. Calls action to generate the next page. Finishes the master and closes the underlying stream. Finishes the master without closing the underlying stream. The following provide hooks for getting a context that behaves in the way that ImagerPress and ImagerViewer behave: This procedure creates a context into which the imager calls do their actions. You must call NewPage with last TRUE for the last page and before the Master is closed. This causes a new page to be written into the master. It must be called with last TRUE on the last page of the master. Κη˜codešœ™Kšœ Οmœ1™K™=K™—š œžœžœžœ˜KK™'K˜—š œžœ ˜K™5K™—š œžœ ˜K™:K™—K˜™sK™—š  œžœ žœ˜6K™§K™—š œžœ,žœž˜?K™wK™—K™Kšžœ˜—…—t}