<> <> <<>> <> DIRECTORY Imager, ImagerBasic, Rope, UnifiedFonts; ImagerInline: CEDAR DEFINITIONS ~ BEGIN Rectangle: TYPE ~ Imager.Rectangle; IntRectangle: TYPE ~ Imager.IntRectangle; Pair: TYPE ~ Imager.Pair; IntPair: TYPE ~ Imager.IntPair; Context: TYPE ~ Imager.Context; Transformation: TYPE ~ Imager.Transformation; Clipper: TYPE ~ Imager.Clipper; Visibility: TYPE ~ Imager.Visibility; Path: TYPE ~ Imager.Path; StrokeEnds: TYPE ~ Imager.StrokeEnds; Color: TYPE ~ Imager.Color; nullBounds: IntRectangle ~ [FIRST[INTEGER], FIRST[INTEGER], FIRST[INTEGER], FIRST[INTEGER]]; ClassRep: TYPE ~ RECORD [ deviceType: ATOM, Init: PROC [context: Context, name: Rope.ROPE, bounds: IntRectangle], DoSaveAll: PROC [context: Context, action: PROC], DoSave: PROC [context: Context, action: PROC], Flush: PROC [context: Context], Close: PROC [context: Context], TranslateT: PROC [context: Context, dx, dy: REAL], RotateT: PROC [context: Context, degrees: REAL], ScaleT: PROC [context: Context, sx, sy: REAL], ConcatT: PROC [context: Context, transformation: Transformation], GetT: PROC [context: Context] RETURNS [Transformation], SetT: PROC [context: Context, transformation: Transformation], IntTranslateT: PROC [context: Context, dx, dy: INTEGER], IntScaleT: PROC [context: Context, sx, sy: INTEGER], GetClipper: PROC [context: Context] RETURNS [Clipper], SetClipper: PROC [context: Context, clipper: Clipper], ClipPath: PROC [context: Context, outline: Path, exclude: BOOLEAN], ClipRectangle: PROC [context: Context, outline: Rectangle, exclude: BOOLEAN], TestRectangle: PROC [context: Context, area: Rectangle] RETURNS [Visibility], ClipIntRectangle: PROC [context: Context, outline: IntRectangle, exclude: BOOLEAN], TestIntRectangle: PROC [context: Context, area: IntRectangle] RETURNS [Visibility], DoWithoutClipping: PROC [context: Context, bounds: IntRectangle, callBack: PROC[Context]], SetColor: PROC [context: Context, color: Color], GetColor: PROC [context: Context] RETURNS [Color], MaskStroke: PROC [context: Context, path: Path, width: REAL, strokeEnds: StrokeEnds, closed: BOOLEAN _ FALSE], MaskFill: PROC [context: Context, path: Path], MaskPixel: PROC [context: Context, pixelArray: ImagerBasic.PixelArray], MaskBits: PROC [context: Context, base: LONG POINTER, raster: CARDINAL, tile: IntRectangle, area: IntRectangle], MaskSegment: PROC [context: Context, p: Pair], MaskIntSegment: PROC [context: Context, p: IntPair], MaskThinStroke: PROC [context: Context, path: Path], MaskRectangle: PROC [context: Context, area: Rectangle], MaskIntRectangle: PROC [context: Context, area: IntRectangle], SetCP: PROC [context: Context, cp: Pair], GetCP: PROC [context: Context] RETURNS [Pair], SetIntCP: PROC [context: Context, cp: IntPair], GetIntCP: PROC [context: Context] RETURNS [IntPair], MaskChar: PROC [context: Context, font: UnifiedFonts.FONT, char: CHAR], MaskCharacters: PROC [context: Context, font: UnifiedFonts.FONT, characters: REF, start: INT _ 0, length: INT], TransferBuffer: PROC [context, source: Context], SetView: PROC [context: Context, box: IntRectangle, halftoneOrigin: IntPair], ClipView: PROC [context: Context, box: IntRectangle, exclude: BOOLEAN], GetSurfaceBounds: PROC [context: Context] RETURNS [IntRectangle], GetViewBounds: PROC [context: Context] RETURNS [IntRectangle], MoveSurfaceRectangle: PROC [context: Context, source: IntRectangle, dest: IntPair] RETURNS [BOOLEAN], SpecialOp: PROC [context: Context, op: ATOM, data: REF] RETURNS [BOOLEAN] ]; Class: PRIVATE PROC [context: Context] RETURNS [REF ClassRep] ~ INLINE {RETURN[NARROW[context.class]]}; DeviceType: PROC [context: Context] RETURNS [ATOM] ~ INLINE {RETURN [Class[context].deviceType]}; DoSaveAll: PROC [context: Context, action: PROC] ~ INLINE {Class[context].DoSaveAll[context, action]}; DoSave: PROC [context: Context, action: PROC] ~ INLINE {Class[context].DoSave[context, action]}; Flush: PROC [context: Context] ~ INLINE {Class[context].Flush[context]}; Close: PROC [context: Context] ~ INLINE {Class[context].Close[context]}; TranslateT: PROC [context: Context, dx, dy: REAL] ~ INLINE {Class[context].TranslateT[context, dx, dy]}; IntScaleT: PROC [context: Context, sx, sy: INTEGER] ~ INLINE {Class[context].IntScaleT[context, sx, sy]}; RotateT: PROC [context: Context, degrees: REAL] ~ INLINE {Class[context].RotateT[context, degrees]}; ScaleT: PROC [context: Context, sx, sy: REAL] ~ INLINE {Class[context].ScaleT[context, sx, sy]}; ConcatT: PROC [context: Context, transformation: Transformation] ~ INLINE {Class[context].ConcatT[context, transformation]}; GetT: PROC [context: Context] RETURNS [Transformation] ~ INLINE {RETURN [Class[context].GetT[context]]}; SetT: PROC [context: Context, transformation: Transformation] ~ INLINE {Class[context].SetT[context, transformation]}; IntTranslateT: PROC [context: Context, dx, dy: INTEGER] ~ INLINE {Class[context].IntTranslateT[context, dx, dy]}; GetClipper: PROC [context: Context] RETURNS [Clipper] ~ INLINE {RETURN [Class[context].GetClipper[context]]}; SetClipper: PROC [context: Context, clipper: Clipper] ~ INLINE {Class[context].SetClipper[context, clipper]}; ClipPath: PROC [context: Context, outline: Path, exclude: BOOLEAN _ FALSE] ~ INLINE {Class[context].ClipPath[context, outline, exclude]}; ClipRectangle: PROC [context: Context, outline: Rectangle, exclude: BOOLEAN _ FALSE] ~ INLINE {Class[context].ClipRectangle[context, outline, exclude]}; TestRectangle: PROC [context: Context, area: Rectangle] RETURNS [Visibility] ~ INLINE {RETURN [Class[context].TestRectangle[context, area]]}; ClipIntRectangle: PROC [context: Context, outline: IntRectangle, exclude: BOOLEAN _ FALSE] ~ INLINE {Class[context].ClipIntRectangle[context, outline, exclude]}; TestIntRectangle: PROC [context: Context, area: IntRectangle] RETURNS [Visibility] ~ INLINE {RETURN [Class[context].TestIntRectangle[context, area]]}; DoWithoutClipping: PROC [context: Context, bounds: IntRectangle, callBack: PROC[Context]] ~ INLINE {Class[context].DoWithoutClipping[context, bounds, callBack]}; SetColor: PROC [context: Context, color: Color] ~ INLINE {Class[context].SetColor[context, color]}; GetColor: PROC [context: Context] RETURNS [Color] ~ INLINE {RETURN [Class[context].GetColor[context]]}; MaskStroke: PROC [context: Context, path: Path, width: REAL, strokeEnds: StrokeEnds, closed: BOOLEAN _ FALSE] ~ INLINE {Class[context].MaskStroke[context, path, width, strokeEnds, closed]}; MaskFill: PROC [context: Context, path: Path] ~ INLINE {Class[context].MaskFill[context, path]}; MaskPixel: PROC [context: Context, pixelArray: ImagerBasic.PixelArray] ~ INLINE {Class[context].MaskPixel[context, pixelArray]}; MaskBits: PROC [context: Context, base: LONG POINTER, raster: CARDINAL, tile: IntRectangle, area: IntRectangle] ~ INLINE {Class[context].MaskBits[context, base, raster, tile, area]}; MaskSegment: PROC [context: Context, p: Pair] ~ INLINE {Class[context].MaskSegment[context, p]}; MaskIntSegment: PROC [context: Context, p: IntPair] ~ INLINE {Class[context].MaskIntSegment[context, p]}; MaskThinStroke: PROC [context: Context, path: Path] ~ INLINE {Class[context].MaskThinStroke[context, path]}; MaskRectangle: PROC [context: Context, area: Rectangle] ~ INLINE {Class[context].MaskRectangle[context, area]}; MaskIntRectangle: PROC [context: Context, area: IntRectangle] ~ INLINE {Class[context].MaskIntRectangle[context, area]}; SetCP: PROC [context: Context, cp: Pair] ~ INLINE {Class[context].SetCP[context, cp]}; GetCP: PROC [context: Context] RETURNS [Pair] ~ INLINE {RETURN [Class[context].GetCP[context]]}; SetIntCP: PROC [context: Context, cp: IntPair] ~ INLINE {Class[context].SetIntCP[context, cp]}; GetIntCP: PROC [context: Context] RETURNS [IntPair] ~ INLINE {RETURN [Class[context].GetIntCP[context]]}; MaskChar: PROC [context: Context, font: UnifiedFonts.FONT, char: CHAR] ~ INLINE {Class[context].MaskChar[context, font, char]}; MaskCharacters: PROC [context: Context, font: UnifiedFonts.FONT, characters: REF, start: INT _ 0, length: INT _ LAST[INT]] ~ INLINE {Class[context].MaskCharacters[context, font, characters, start, length]}; TransferBuffer: PROC [context, source: Context] ~ INLINE {Class[context].TransferBuffer[context, source]}; SpecialOp: PROC [context: Context, op: ATOM, data: REF] RETURNS [BOOLEAN] ~ INLINE {RETURN [Class[context].SpecialOp[context, op, data]]}; <> SetView: PROC [context: Context, box: IntRectangle, halftoneOrigin: IntPair _ [0, 0]] ~ INLINE {Class[context].SetView[context, box, halftoneOrigin]}; <> ClipView: PROC [context: Context, box: IntRectangle, exclude: BOOLEAN] ~ INLINE {Class[context].ClipView[context, box, exclude]}; <> GetSurfaceBounds: PROC [context: Context] RETURNS [IntRectangle] ~ INLINE {RETURN [Class[context].GetSurfaceBounds[context]]}; <> GetViewBounds: PROC [context: Context] RETURNS [IntRectangle] ~ INLINE {RETURN [Class[context].GetViewBounds[context]]}; <> MoveSurfaceRectangle: PROC [context: Context, source: IntRectangle, dest: IntPair] RETURNS [BOOLEAN] ~ INLINE {RETURN [Class[context].MoveSurfaceRectangle[context, source, dest]]}; <> END.