<> <> <> <<>> DIRECTORY ImagerColor USING [Color], ImagerDevice USING [Device], ImagerFont USING [Font], ImagerManhattan USING [DeviceRectangle, Polygon], ImagerPath USING [Clipper], ImagerScanConverter USING [DevicePath], ImagerTransformation USING [Transformation], Vector2 USING [VEC]; ImagerRasterPrivate: CEDAR DEFINITIONS ~ BEGIN CARD: TYPE ~ LONG CARDINAL; IVEC: TYPE ~ RECORD[x, y: INTEGER]; Color: TYPE ~ ImagerColor.Color; Font: TYPE ~ ImagerFont.Font; Clipper: TYPE ~ ImagerPath.Clipper; Transformation: TYPE ~ ImagerTransformation.Transformation; VEC: TYPE ~ Vector2.VEC; DevicePath: TYPE ~ ImagerScanConverter.DevicePath; DeviceRectangle: TYPE ~ ImagerManhattan.DeviceRectangle; ManhattanPolygon: TYPE ~ ImagerManhattan.Polygon; PersistentVariables: TYPE ~ RECORD[ cp: VEC _ [0, 0], -- current position, view coords correctMeasure: VEC _ [0, 0], -- target line measure for Correct, view coords correctMaskCount: INT _ 0, -- tally number of CorrectMask calls in pass 1 correctSum: VEC _ [0, 0], -- tally adjustable space from CorrectSpace calls in pass 1 correctMask: VEC _ [0, 0], -- amount of space added by each CorrectMask call in pass 2 correctSpace: VEC _ [0, 0] -- fraction of space added by each CorrectSpace call in pass 2 ]; NonPersistentVariables: TYPE ~ RECORD[ priorityImportant: INT _ 0, -- if nonzero, priority of masks is important mediumSize: VEC _ [0, 0], -- size of medium, in meters fieldMin: VEC _ [0, 0], -- minimum x and y of field, in meters fieldMax: VEC _ [0, 0], -- maximum x and y of field, in meters noImage: INT _ 0, -- if nonzero, don't image masks strokeWidth: REAL _ 0, -- stroke width, client coords strokeStyle: INT _ 0, -- stroke end and joint treatment underlineStart: REAL _ 0, -- starting x position for underline, client coords amplifySpace: REAL _ 1.0, -- multiplies width of amplified characters correctPass: INT _ 0, -- which pass, during Correct correctShrink: REAL _ 0.5, -- allowable space shrink correctTolerance: VEC _ [0, 0] -- tolerable deviation from correctMeasure, view coords ]; Data: TYPE ~ REF DataRep; DataRep: TYPE ~ RECORD[ p: PersistentVariables _ [], -- persistent variables np: NonPersistentVariables _ [], -- non-persistent variables other than T, font, color, clipper clientToView: Transformation _ NIL, -- current client-to-view transformation ("T") clientToViewID: CARD _ 0, -- unique id for contents of clientToView transformation lastID: CARD _ 0, -- last value used for clientToViewID font: Font _ NIL, -- current font ("showVec") color: Color _ NIL, -- current color clipper: Clipper _ NIL, -- current clipping outline devicePath: ImagerScanConverter.DevicePath _ NIL, -- scratch storage for scan converter viewToDeviceValid: BOOL _ FALSE, viewClipperValid: BOOL _ FALSE, clientToDeviceValid: BOOL _ FALSE, clientClipperValid: BOOL _ FALSE, charToDeviceValid: BOOL _ FALSE, deviceColorValid: BOOL _ FALSE, devicePriorityValid: BOOL _ FALSE, viewToDeviceEasy: BOOL _ FALSE, -- valid iff viewToDeviceValid clientToDeviceEasy: BOOL _ FALSE, -- valid iff clientToDeviceValid viewToDevice: Transformation _ NIL, -- always valid clientToDevice: Transformation _ NIL, -- valid iff clientToDeviceValid charToDevice: Transformation _ NIL, -- valid iff charToDeviceValid viewOrigin: IVEC _ [0, 0], -- valid iff viewToDeviceValid AND viewToDeviceEasy clientOrigin: IVEC _ [0, 0], -- valid iff clientToDeviceValid AND clientToDeviceEasy viewClipMask: ManhattanPolygon _ NIL, -- device coords; always valid clientClipMask: ManhattanPolygon _ NIL, -- device coords; valid iff clientClipperValid viewClipBox: DeviceRectangle _ [0, 0, 0, 0], -- device coords; valid iff viewClipperValid clientClipBox: DeviceRectangle _ [0, 0, 0, 0], -- device coords; valid iff clientClipperValid device: ImagerDevice.Device _ NIL -- a particular raster device ]; CreateData: PROC[ImagerDevice.Device] RETURNS[Data]; END.