<> <> <> DIRECTORY Graphics USING [Context], IPBasic USING [Integer, Vector], IPFont USING [FontKey], IPImagerBasic USING [Color, Outline, Pair, PixelArray, Trajectory, Transformation], IPOutput USING [Ref], IPScan USING [DevicePath], UnifiedFonts USING [FONT]; IPImager: CEDAR DEFINITIONS = BEGIN OPEN IPImagerBasic, IPBasic; Imager: TYPE = REF ImagerRep; ImagerRep: TYPE = RECORD[ vars: Vars, path: IPScan.DevicePath, output: IPOutput.Ref, context: Graphics.Context, font: UnifiedFonts.FONT ]; Vars: TYPE = REF VarsRep; VarsRep: TYPE = RECORD[ link: Vars, -- link to previous state p: PersistentVars, -- persistent variables np: NonPersistentVars, -- non-persistent variables which aren't REFs T: Transformation, -- transformation showVec: Vector, -- showVec (Font or Vec) color: Color, -- color (constant or sampled) fontList: CachedFont -- list of fonts used under current transformation ]; CachedFont: TYPE = REF CachedFontRep; CachedFontRep: TYPE = RECORD[link: CachedFont, key: IPFont.FontKey, font: UnifiedFonts.FONT]; PersistentVars: TYPE = REF PersistentVarsRep; PersistentVarsRep: TYPE = RECORD[ cpx, cpy: REAL, -- current position correctMX, correctMY: REAL, -- line measure correctMaskCount: INT, -- tally CORRECTMASK calls correctMaskX, correctMaskY: REAL, -- space to be taken up by CORRECTMASK calls correctSumX, correctSumY: REAL, -- tally adjustable space from CORRECTSPACE calls correctSpaceX, correctSpaceY: REAL, -- space to be taken up by CORRECTSPACE calls correctcpx, correctcpy: REAL, -- current position at start of CORRECT correctTargetX, correctTargetY: REAL -- where corrected text should end up ]; NonPersistentVars: TYPE = REF NonPersistentVarsRep; NonPersistentVarsRep: TYPE = RECORD[ priorityImportant: Integer, mediumXSize, mediumYSize: REAL, fieldXMin, fieldYMin: REAL, fieldXMax, fieldYMax: REAL, strokeWidth: REAL, strokeEnd: Integer, noImage: Integer, underlineStart: REAL, amplifySpace: REAL, correctPass: Integer, correctShrink: REAL, -- allowable space shrink correctTX, correctTY: REAL -- line tolerance ]; Procs: TYPE = REF READONLY ProcsRep; ProcsRep: TYPE = RECORD[ Show: PROC[imager: Imager, s: Vector, xrel: BOOL _ FALSE], MaskFill: PROC[imager: Imager, o: Outline], MaskStroke: PROC[imager: Imager, t: Trajectory, closed: BOOL _ FALSE], MaskRectangle: PROC[imager: Imager, x, y, w, h: REAL], MaskVector: PROC[imager: Imager, p1, p2: Pair], MaskTrapezoidX: PROC[imager: Imager, x1, y1, x2, x3, y3, x4: REAL], MaskTrapezoidY: PROC[imager: Imager, x1, y1, y2, x3, y3, y4: REAL], MaskPixel: PROC[imager: Imager, pa: PixelArray] ]; END.