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. ImagerInline.mesa Michael Plass, August 1, 1983 4:25 pm Implements the same operations as Imager, saving a procedure call per operation. Object-style notation is not usable with this interface. Procedures for manipulating View-to-Surface transformation and clipper (window packages only, please) Sets the View-to-Surface transformation to map the origin in View coordinates to (box.x and box.y) in Surface coordinates, and the View-to-Surface clipper to show the specified box. The halftoneOrigin parameter is for controlling the phase of halftones, and is also expressed in terms of Surface coordinates. For setting up fancier clippers; the box is in Surface coordinates. For finding out where the usable parts of the Surface are. The results are in Surface coordinates. Yields the bounding box of the View clipper, in Surface coordinates. Moves the source rectangle so that its new origin is at dest. Both source and dest are in Surface coordinates. Returns FALSE if the device does not support the operation. Overlapping source and dest are allowed. Clippers are ignored. Beware of moving images containing halftones, because this may cause misaligned halftone screens. The halftone screens are aligned by SetView, so the window package may move viewers around without problems. Ê ™˜J™J™%J™J™ŠJ˜JšÏk œ)˜2Jšœœ œ˜'J˜Jšœ œ˜#Jšœœ˜)Jšœœ˜Jšœ œ˜Jšœ œ˜Jšœœ˜-Jšœ œ˜Jšœ œ˜%Jšœœ˜Jšœ œ˜%Jšœœ˜J˜Jšœœœœœœœœœ˜\J˜šœ œœ˜Jšœ œ˜JšÏnœœœ˜EJšž œœœ˜1Jšžœœœ˜.Jšžœœ˜Jšžœœ˜Jšž œœœ˜2Jšžœœœ˜0Jšžœœœ˜.Jšžœœ4˜AJšžœœœ˜7Jšžœœ4˜>Jšž œœœ˜8Jšž œœœ˜4Jšž œœœ ˜6Jšž œœ&˜6Jšžœœ,œ˜CJšž œœ1œ˜MJšž œœ%œ˜MJšžœœ4œ˜SJšžœœ(œ˜SJšžœœ4œ ˜ZJšžœœ"˜0Jšžœœœ ˜2Jš ž œœ'œ"œœ˜nJšžœœ ˜.Jšž œœ8˜GJš žœœœœ œ*˜pJšž œœ˜.Jšžœœ ˜4Jšžœœ ˜4Jšž œœ%˜8Jšžœœ(˜>Jšžœœ˜)Jšžœœœ˜.Jšžœœ!˜/Jšžœœœ ˜4Jšžœœ'œœ˜GJš žœœ'œœ œœ˜oJšžœœ˜0Jšžœœ@˜MJšžœœ0œ˜GJšžœœœ˜AJšž œœœ˜>Jšžœœ9œœ˜eJš ž œœœœœœ˜IJšœ˜—š žœœœœœ ˜=Jšœœœœ˜)—šž œœœœ˜2Jšœœœ˜.—šž œœœ˜0Jšœœ-˜5—šžœœœ˜-Jšœœ*˜2—šžœœ˜Jšœœ!˜)—šžœœ˜Jšœœ!˜)—šž œœœ˜1Jšœœ.˜6—šž œœœ˜3Jšœœ-˜5—šžœœœ˜/Jšœœ,˜4—šžœœœ˜-Jšœœ*˜2—šžœœ3˜@Jšœœ3˜;—šžœœœ˜6Jšœœœ!˜1—šžœœ3˜=Jšœœ0˜8—šž œœœ˜7Jšœœ1˜9—šž œœœ ˜5Jšœœœ'˜7—šž œœ%˜5Jšœœ/˜7—šžœœ,œœ˜JJšœœ6˜>—šž œœ1œœ˜TJšœœ;˜C—šž œœ%œ ˜LJšœœœ0˜@—šžœœ4œœ˜ZJšœœ>˜F—šžœœ(œ ˜RJšœœœ3˜C—šžœœ4œ ˜YJšœœ?˜G—šžœœ!˜/Jšœœ+˜3—šžœœœ˜1Jšœœœ%˜5—š ž œœ'œ"œœ˜mJšœœG˜O—šžœœ˜-Jšœœ*˜2—šž œœ7˜FJšœœ1˜9—š žœœœœ œ)˜oJšœœ>˜F—šž œœ˜-Jšœœ*˜2—šžœœ˜3Jšœœ-˜5—šžœœ˜3Jšœœ0˜8—šž œœ$˜7Jšœœ/˜7—šžœœ'˜=Jšœœ2˜:—šžœœ˜(Jšœœ%˜-—šžœœœ˜-Jšœœœ"˜2—šžœœ ˜.Jšœœ(˜0—šžœœœ ˜3Jšœœœ%˜5—šžœœ'œœ˜FJšœœ0˜8—šžœœ'œœ œœœœ˜zJšœœK˜S—šžœœ˜/Jšœœ2˜:—š ž œœœœœœ˜IJšœœœ0˜@—J˜™ešžœœH˜UJšœœ8˜@Jšœµ™µ—šžœœ0œ˜FJšœœ2˜:J™C—šžœœœ˜@Jšœœœ-˜=J™c—šž œœœ˜=Jšœœœ*˜:J™D—šžœœ9œœ˜dJšœœœ?˜OJ™¾——Jšœ˜—…—#\2