<> <> <> <> DIRECTORY ImagerColorDefs USING [Color], ImagerFont USING [CorrectionType, XChar], ImagerTransformation USING [Transformation], Scaled USING [Value], Vector2 USING [VEC]; ImagerDevice: CEDAR DEFINITIONS ~ BEGIN Transformation: TYPE ~ ImagerTransformation.Transformation; VEC: TYPE ~ Vector2.VEC; DeviceBox: TYPE ~ RECORD [smin, fmin, smax, fmax: CARDINAL]; RunProc: TYPE ~ PROC [sMin, fMin: INTEGER, fSize: NAT]; BoxProc: TYPE ~ PROC [DeviceBox]; HalftoneParameters: TYPE ~ RECORD[ dotsPerInch: REAL, angle: REAL, -- degrees anticlockwise from +x axis shape: REAL -- 0.5 is circular ]; Device: TYPE ~ REF DeviceRep; DeviceRep: TYPE ~ RECORD[ class: Class, -- class operations data: REF, -- instance data box: DeviceBox, -- bounding rectangle, in device coordinates surfaceToDevice: Transformation, -- transformation from surface to device coordinates surfaceUnitsPerInch: VEC, -- x and y scale factors surfaceUnitsPerPixel: NAT -- surface resolution may be a multiple of pixel resolution ]; CharMask: TYPE ~ REF CharMaskRep; CharMaskRep: TYPE ~ MACHINE DEPENDENT RECORD [ font: REF, -- font and char together provide a unique identifier for this mask char: ImagerFont.XChar, sWidth, fWidth: Scaled.Value, sMinBB, fMinBB: INTEGER, sSizeBB, fSizeBB: CARDINAL, metricsValid: BOOL, -- numbers above are invalid if this is true. amplified: BOOL, correction: ImagerFont.CorrectionType, flag: PACKED ARRAY [0..10) OF [0..1], -- for padding and expansion data: SELECT rep: * FROM raster => [bits: SEQUENCE COMPUTED CARDINAL -- sSize*Ceiling[fSize/16.0] -- OF WORD], runs => [run: SEQUENCE nRuns: CARDINAL OF Run], uncached => [], ENDCASE ]; Run: TYPE ~ MACHINE DEPENDENT RECORD [fMin: CARDINAL, lastRun: BOOL, fSize: NAT]; <> Class: TYPE ~ REF ClassRep; ClassRep: TYPE ~ RECORD[ type: ATOM, SetColor: PROC[device: Device, color: ImagerColorDefs.Color, viewToDevice: Transformation], SetPriority: PROC[device: Device, priorityImportant: BOOL], SetHalftone: PROC[device: Device, halftone: HalftoneParameters], MaskRuns: PROC[device: Device, bounds: DeviceBox, runs: PROC[RunProc]], MaskBoxes: PROC[device: Device, bounds: DeviceBox, boxes: PROC[BoxProc]], MaskBits: PROC[device: Device, srcBase: LONG POINTER, srcWordsPerLine: NAT, ts, tf: INTEGER, boxes: PROC[BoxProc]], DrawBits: PROC[device: Device, srcBase: LONG POINTER, srcWordsPerLine: NAT, ts, tf: INTEGER, boxes: PROC[BoxProc]] _ NIL, MoveBoxes: PROC[device: Device, ts, tf: INTEGER, boxes: PROC[BoxProc]], MaskChar: PROC[device: Device, s, f: INTEGER, mask: CharMask] ]; END.