DIRECTORY Basics, Convert, FileNames, GGBasicTypes, GGFont, GGFromImager, GGModelTypes, GGScene, GGOutline, GGParseIn, GGSegment, GGSegmentTypes, GGSlice, GGTraj, Vectors2d, Imager, ImagerBackdoor, ImagerColor, ImagerFont, ImagerInterpress, ImagerPath, ImagerPrivate, ImagerState, ImagerTransformation, ImagerTypeface, Interpress, IO, RefText, Rope, SF, ViewerClasses; GGFromImagerImpl: CEDAR PROGRAM IMPORTS Convert, FileNames, GGFont, GGParseIn, GGScene, GGOutline, GGSegment, GGSlice, GGTraj, Vectors2d, Imager, ImagerBackdoor, ImagerFont, ImagerInterpress, ImagerPath, ImagerState, ImagerTransformation, Interpress, IO, RefText, Rope EXPORTS GGFromImager, Imager, ImagerFont = BEGIN ROPE: TYPE ~ Rope.ROPE; Class: TYPE ~ REF ClassRep; ClassRep: PUBLIC TYPE ~ ImagerPrivate.ClassRep; -- export to Imager.ClassRep Context: TYPE ~ Imager.Context; Color: TYPE ~ Imager.Color; ColorOperator: TYPE ~ Imager.ColorOperator; CoordSys: TYPE ~ ImagerBackdoor.CoordSys; Clipper: TYPE ~ ImagerBackdoor.Clipper; Font: TYPE ~ ImagerFont.Font; Object: TYPE ~ Imager.Object; PathProc: TYPE ~ ImagerPath.PathProc; PixelArray: TYPE ~ Imager.PixelArray; PixelMap: TYPE ~ Imager.PixelMap; Point: TYPE ~ GGBasicTypes.Point; Rectangle: TYPE ~ Imager.Rectangle; SampleMap: TYPE ~ Imager.SampleMap; ScanMode: TYPE ~ ImagerTransformation.ScanMode; SequenceOfReal: TYPE ~ GGBasicTypes.SequenceOfReal; SequenceOfRealObj: TYPE ~ GGBasicTypes.SequenceOfRealObj; Slice: TYPE ~ GGModelTypes.Slice; SliceParts: TYPE ~ GGModelTypes.SliceParts; State: TYPE ~ REF StateRep; StrokeEnd: TYPE ~ Imager.StrokeEnd; StrokeJoint: TYPE ~ Imager.StrokeJoint; StateRep: PUBLIC TYPE ~ ImagerState.StateRep; Transformation: TYPE ~ ImagerTransformation.Transformation; VEC: TYPE ~ Imager.VEC; Viewer: TYPE ~ ViewerClasses.Viewer; Visibility: TYPE ~ ImagerBackdoor.Visibility; XChar: TYPE ~ ImagerFont.XChar; XStringProc: TYPE ~ ImagerFont.XStringProc; Data: TYPE ~ REF DataRep; DataRep: TYPE ~ RECORD [ scene: GGModelTypes.Scene, feedback: Viewer ]; Typeface: TYPE ~ REF TypefaceRep; TypefaceRep: PUBLIC TYPE = ImagerTypeface.TypefaceRep; -- export to ImagerFont WarningMessage: PUBLIC SIGNAL [context: Context, code: ATOM, message: ROPE] ~ CODE; Create: PROC [feedback: Viewer] RETURNS [Context] ~ { data: Data ~ NEW[DataRep _ [scene: GGScene.CreateScene[], feedback: feedback]]; state: State ~ NEW[StateRep _ []]; state.T _ ImagerTransformation.Scale[1.0]; -- allocate storage for a transformation and initialize to the identity state.color _ Imager.black; RETURN[NEW[Imager.ContextRep _ [class: gargoyleClass, state: state, data: data]]]; }; Capture: PUBLIC PROC [action: PROC [Context], feedback: Viewer _ NIL] RETURNS [GGModelTypes.Scene] ~ { context: Context ~ Create[feedback]; action[context]; WITH context.data SELECT FROM data: Data => RETURN [data.scene]; ENDCASE => ERROR; }; ProcessStateChanges: PUBLIC PROC [context: Context] ~ { state: State ~ context.state; changed: ImagerState.ChangeFlags ~ state.changed; state.changed _ ImagerState.notChanged; IF changed.clipper AND state.clipper # NIL THEN SIGNAL WarningMessage[context, $Clipping, "NotImplemented: Clipping"]; }; RopeFromXStringProc: PROC [string: XStringProc] RETURNS [rope: ROPE _ NIL] ~ { text: REF TEXT _ RefText.ObtainScratch[256]; set: BYTE _ 0; action: PROC [char: XChar] ~ { IF char.set#set THEN { text _ RefText.AppendChar[to: text, from: VAL[255]]; text _ RefText.AppendChar[to: text, from: VAL[set _ char.set]]; }; text _ RefText.AppendChar[to: text, from: VAL[char.code]]; }; text.length _ 0; string[action]; rope _ Rope.FromRefText[text]; RefText.ReleaseScratch[text]; RETURN [rope]; }; UnpackComplexFontName: PROC [fontName: Rope.ROPE] RETURNS [prefix, family, face: Rope.ROPE, fontSize: REAL] = { DigitProc: IO.BreakProc = { SELECT char FROM IO.TAB, IO.CR, IO.SP => RETURN [break]; '0, '1, '2, '3, '4, '5, '6, '7, '8, '9 => RETURN [break]; ENDCASE => RETURN [other]; }; AlphaProc: IO.BreakProc = { SELECT char FROM IO.TAB, IO.CR, IO.SP => RETURN [break]; IN ['a .. 'z], IN ['A .. 'Z] => RETURN [break]; ENDCASE => RETURN [other]; }; new, sizeRope: Rope.ROPE; prefix _ FileNames.Directory[path: fontName]; -- "xerox/*fonts/" new _ FileNames.GetShortName[fontName]; -- get family "name" face _ FileNames.Tail[new, '-]; -- get face component (MIR, BRR, ...) IF Rope.Equal[face, new] THEN { -- have a name like Helvetica10I OR TERMINAL endOfName: BOOL; nameStream: IO.STREAM _ IO.RIS[new]; family _ IO.GetTokenRope[nameStream, DigitProc].token; -- get the leading alpha characters sizeRope _ IO.GetTokenRope[nameStream, AlphaProc ! IO.EndOfStream, IO.Error => {endOfName _ TRUE; CONTINUE;};].token; -- get any digit characters fontSize _ Convert.RealFromRope[sizeRope]; IF endOfName THEN face _ "" -- because face = new ELSE face _ Rope.Concat["-", GGParseIn.ReadBlankAndWord[nameStream]]; } ELSE { -- have a name like Helvetica-MIR family _ Rope.Substr[base: new, start: 0, len: Rope.SkipTo[s: new, pos: 0, skip: "-"]]; -- throw away "-XXX" face _ SELECT TRUE FROM Rope.Equal[face, "MRR", FALSE] => "", Rope.Equal[face, "BRR", FALSE] => "-B", Rope.Equal[face, "Bold", FALSE] => "-B", Rope.Equal[face, "MIR", FALSE] => "-I", Rope.Equal[face, "Italic", FALSE] => "-I", Rope.Equal[face, "BIR", FALSE] => "-BI", ENDCASE => ERROR; fontSize _ 1.0; }; }; SetSegProperties: PROC [context: Context, m: Transformation, outlined: BOOL, seg: GGSegmentTypes.Segment] = { strokeEnd: StrokeEnd; strokeEnd _ VAL[NAT[context.state.np.strokeEnd]]; IF outlined THEN { seg.strokeWidth _ Vectors2d.Magnitude[ImagerTransformation.TransformVec[m, [context.state.np.strokeWidth, 0.0] ] ]; seg.color _ IF ISTYPE[context.state.color, ImagerColor.ConstantColor] THEN context.state.color ELSE Imager.black; seg.strokeEnd _ strokeEnd; } ELSE { seg.strokeWidth _ 0.0; seg.color _ NIL; seg.strokeEnd _ round; }; }; OutlineFromPath: PROC[context: Context, path: PathProc, m: Transformation, closed: BOOL, outlined: BOOL _ TRUE] RETURNS [GGModelTypes.Outline] ~ { curOutline: GGModelTypes.Outline _ NIL; curTraj: GGModelTypes.Traj _ NIL; curSeg: GGSegmentTypes.Segment _ NIL; lp: VEC _ [0,0]; firstPoint: VEC _ [0,0]; Finish: PROC ~ { IF curTraj # NIL THEN { IF curSeg # NIL THEN { IF closed THEN { IF curSeg.hi = firstPoint THEN { [] _ GGTraj.AddSegment[curTraj, hi, curSeg, lo]; GGTraj.CloseByDistorting[curTraj, hi]; } ELSE { [] _ GGTraj.AddSegment[curTraj, hi, curSeg, lo]; curSeg _ GGSegment.MakeLine[curSeg.hi, firstPoint, NIL]; SetSegProperties[context, m, outlined, curSeg]; GGTraj.CloseWithSegment[curTraj, curSeg, lo]; }; } ELSE [] _ GGTraj.AddSegment[curTraj, hi, curSeg, lo]; } ELSE { -- unlikely but legal case: Traj with a single point, no segment [] _ GGTraj.AddSegment[curTraj, lo, GGSegment.MakeLine[[lp.x, lp.y], [lp.x, lp.y], NIL], lo]; }; curSeg _ NIL; IF curOutline = NIL THEN curOutline _ GGOutline.CreateOutline[curTraj, NIL] ELSE curOutline _ GGOutline.AddHole[curOutline, curTraj]; curTraj _ NIL; }; }; Move: PROC [p: VEC] ~ { Finish[]; curTraj _ GGTraj.CreateTraj[[p.x, p.y]]; firstPoint _ lp _ p; }; Line: PROC [p1: VEC] ~ { IF curSeg # NIL THEN [] _ GGTraj.AddSegment[curTraj, hi, curSeg, lo]; curSeg _ GGSegment.MakeLine[[lp.x, lp.y], [p1.x, p1.y], NIL]; SetSegProperties[context, m, outlined, curSeg]; lp _ p1; }; Curve: PROC [p1, p2, p3: VEC] ~ { IF curSeg # NIL THEN [] _ GGTraj.AddSegment[curTraj, hi, curSeg, lo]; curSeg _ GGSegment.MakeBezier[[lp.x, lp.y], [p1.x, p1.y], [p2.x, p2.y], [p3.x, p3.y], NIL]; SetSegProperties[context, m, outlined, curSeg]; lp _ p3; }; Conic: PROC [p1, p2: VEC, r: REAL] ~ { IF curSeg # NIL THEN [] _ GGTraj.AddSegment[curTraj, hi, curSeg, lo]; curSeg _ GGSegment.MakeConic[[lp.x, lp.y], [p1.x, p1.y], [p2.x, p2.y], r, NIL]; SetSegProperties[context, m, outlined, curSeg]; lp _ p2; }; Arc: PROC [p1, p2: VEC] ~ { IF curSeg # NIL THEN [] _ GGTraj.AddSegment[curTraj, hi, curSeg, lo]; curSeg _ GGSegment.MakeArc[[lp.x, lp.y], [p1.x, p1.y], [p2.x, p2.y], NIL]; SetSegProperties[context, m, outlined, curSeg]; lp _ p2; }; ImagerPath.Transform[path, m, Move, Line, Curve, Conic, Arc]; Finish[]; RETURN [curOutline]; }; MyShow: PROC[context: Context, string: XStringProc, xrel: BOOL] = { MyShowAux[context, RopeFromXStringProc[string], xrel]; }; MyShowText: PROC [context: Context, text: REF READONLY TEXT, start, len: NAT, xrel: BOOL] = { MyShowAux[context, Rope.FromRefText[s: text, start: start, len: len], xrel]; }; MyShowAux: PROC[context: Context, rope: Rope.ROPE, xrel: BOOL] = { OPEN ImagerTransformation; font: ImagerFont.Font _ context.class.GetFont[context]; escapement: VEC _ ImagerFont.RopeEscapement[font, rope]; IF context.state.np.noImage=0 THEN { textSlice: GGModelTypes.Slice; data: Data _ NARROW[context.data]; amplifySpace: REAL _ ImagerBackdoor.GetReal[context, $amplifySpace]; color: Imager.Color _ context.class.GetColor[context]; currentT: Transformation _ context.class.GetT[context]; currentPoint: Point _ context.class.GetCP[context, FALSE]; fontData: GGFont.FontData _ GGFont.ParseFontData[data: NIL, inStream: IO.RIS[ImagerFont.Name[font]], literalP: TRUE]; fontData.transform _ Cat[Scale[fontData.storedSize], font.charToClient, Translate[currentPoint], currentT]; fontData.substituteOK _ TRUE; -- allow font substitution on file reads textSlice _ GGSlice.MakeTextSlice[rope, amplifySpace]; [] _ GGSlice.SetTextFontAndTransform[textSlice, fontData, NIL]; textSlice.class.setFillColor[textSlice, color]; GGScene.AddSlice[data.scene, textSlice, -1]; }; ImagerState.StateSetXYRel[context, escapement]; }; MyShowBackward: PROC[context: Context, string: XStringProc] = { SIGNAL WarningMessage[context, $MyShowBackward, "NotImplemented: ShowBackward"]; }; MyMaskFill: PROC[context: Context, path: PathProc, oddWrap: BOOL] = { data: Data ~ NARROW[context.data]; state: State ~ context.state; IF state.changed#ImagerState.notChanged THEN ProcessStateChanges[context]; IF oddWrap THEN SIGNAL WarningMessage[context, $ParityFill, "NotImplemented: ParityFill"]; IF context.state.np.noImage=0 THEN { outline: GGModelTypes.Outline _ OutlineFromPath[context, path, state.T, TRUE, FALSE]; outline.class.setFillColor[outline, state.color]; GGScene.AddOutline[data.scene, outline, -1]; }; }; MyMaskStroke: PROC[context: Context, path: PathProc, closed: BOOL] ~ { outline: GGModelTypes.Outline; strokeJoint: StrokeJoint; data: Data ~ NARROW[context.data]; state: State ~ context.state; IF state.changed#ImagerState.notChanged THEN ProcessStateChanges[context]; IF context.state.np.noImage=0 THEN { outline _ OutlineFromPath[context, path, state.T, closed]; outline.class.setFillColor[outline, NIL]; -- no fill color strokeJoint _ VAL[NAT[context.state.np.strokeJoint]]; outline.class.setStrokeJoint[outline, outline.class.newParts[outline, NIL, slice].parts, strokeJoint]; GGScene.AddOutline[data.scene, outline, -1]; }; }; MyMaskDashedStroke: PROC[context: Context, path: PathProc, patternLen: NAT, pattern: PROC [NAT] RETURNS [REAL], offset, length: REAL] ~ { outline: GGModelTypes.Outline; strokeJoint: StrokeJoint; data: Data ~ NARROW[context.data]; state: State ~ context.state; patternSeq: SequenceOfReal _ NEW[SequenceOfRealObj[patternLen]]; IF state.changed#ImagerState.notChanged THEN ProcessStateChanges[context]; IF context.state.np.noImage=0 THEN { completeParts: SliceParts; outline _ OutlineFromPath[context, path, state.T, FALSE]; completeParts _ outline.class.newParts[outline, NIL, slice].parts; outline.class.setFillColor[outline, NIL]; -- no fill color strokeJoint _ VAL[NAT[context.state.np.strokeJoint]]; outline.class.setStrokeJoint[outline, completeParts, strokeJoint]; FOR i: NAT IN [0..patternLen) DO patternSeq[i] _ pattern[i]; ENDLOOP; outline.class.setDashed[outline, completeParts, TRUE, patternSeq, offset, length]; GGScene.AddOutline[data.scene, outline, -1]; }; }; MyShowAndFixedXRel: PROC [context: Context, string: XStringProc, x: REAL] ~ { SIGNAL WarningMessage[context, $ShowAndFixedXRel, "Not implemented: ShowAndFixedXRel"]; }; MyMaskRectangle: PROC[context: Context, r: Rectangle] ~ { path: PathProc ~ { moveTo[[r.x, r.y]]; lineTo[[r.x+r.w, r.y]]; lineTo[[r.x+r.w, r.y+r.h]]; lineTo[[r.x, r.y+r.h]] }; MyMaskFill[context, path, FALSE]; }; MyMaskRectangleI: PROC[context: Context, x, y, w, h: INTEGER] ~ { MyMaskRectangle[context, [x, y, w, h]]; }; MyMaskVector: PROC[context: Context, p1, p2: VEC] ~ { path: PathProc ~ {moveTo[p1]; lineTo[p2]}; MyMaskStroke[context, path, FALSE]; }; MyMaskPixel: PROC[context: Context, pa: PixelArray] ~ { DoMyMaskPixel: PROC [dc: Imager.Context] = { Imager.MaskPixel[dc, pa]; }; data: Data _ NARROW[context.data]; ipSlice: Slice; currentColor: Color; currentT: ImagerTransformation.Transformation; currentColor _ context.state.color; currentT _ ImagerTransformation.Copy[context.state.T]; ipSlice _ GGSlice.MakeIPSliceFromMaskPixel[pa, currentColor, NIL, currentT]; GGScene.AddSlice[data.scene, ipSlice, -1]; }; MyMaskBitmap: PROC[context: Context, bitmap: SampleMap, referencePoint: SF.Vec, scanMode: ScanMode, position: VEC] ~ { DoMyMaskBits: PROC [dc: Imager.Context] = { Imager.MaskBitmap[dc, bitmap, referencePoint, scanMode, position]; }; masterStream, outStream: IO.STREAM; masterRope: Rope.ROPE; data: Data _ NARROW[context.data]; ipRef: ImagerInterpress.Ref; ipMaster: Interpress.Master; ipSlice: Slice; SIGNAL WarningMessage[context, $MaskBitmap, "NotImplemented: MaskBitmap"]; outStream _ IO.ROS[]; ipRef _ ImagerInterpress.CreateFromStream[outStream, "Interpress/Xerox/3.0 "]; ImagerInterpress.DoPage[ipRef, DoMyMaskBits]; ImagerInterpress.Finish[ipRef]; masterRope _ IO.RopeFromROS[outStream]; masterStream _ IO.RIS[masterRope]; ipMaster _ Interpress.FromStream[masterStream, NIL]; GGScene.AddSlice[data.scene, ipSlice, -1]; }; MyDrawBitmap: PROC [context: Context, bitmap: SampleMap, referencePoint: SF.Vec, scanMode: ScanMode, position: VEC] ~ { DoMyDrawBits: PROC [dc: Imager.Context] = { Imager.MaskBitmap[dc, bitmap, referencePoint, scanMode, position]; }; masterStream, outStream: IO.STREAM; masterRope: Rope.ROPE; data: Data _ NARROW[context.data]; ipRef: ImagerInterpress.Ref; ipMaster: Interpress.Master; ipSlice: Slice; SIGNAL WarningMessage[context, $DrawBits, "NotImplemented: DrawBits"]; outStream _ IO.ROS[]; ipRef _ ImagerInterpress.CreateFromStream[outStream, "Interpress/Xerox/3.0 "]; ImagerInterpress.DoPage[ipRef, DoMyDrawBits]; ImagerInterpress.Finish[ipRef]; masterRope _ IO.RopeFromROS[outStream]; masterStream _ IO.RIS[masterRope]; ipMaster _ Interpress.FromStream[masterStream, NIL]; GGScene.AddSlice[data.scene, ipSlice, -1]; }; MyDrawPixels: PROC[context: Context, pixelMap: PixelMap, colorOperator: ColorOperator, referencePoint: SF.Vec, scanMode: ScanMode, position: VEC] ~ { SIGNAL WarningMessage[context, $MyDrawPixels, "NotImplemented: DrawPixels"]; }; MyDoIfVisible: PROC[context: Context, r: Rectangle, action: PROC] ~ { SIGNAL WarningMessage[context, $MyDoIfVisible, "NotImplemented: DoIfVisible"]; }; MyDoWithBuffer: PROC[context: Context, action: PROC, x, y, w, h: INTEGER, backgroundColor: Color] ~ { SIGNAL WarningMessage[context, $MyDoWithBuffer, "NotImplemented: DoWithBuffer"]; }; MyDrawObject: PROC[context: Context, object: Object, position: VEC, interactive: BOOL] ~ { SIGNAL WarningMessage[context, $MyDrawObject, "NotImplemented: DrawObject:"]; }; MyGetBounds: PROC [context: Context] RETURNS [Rectangle] ~ { ERROR Imager.Error[[$NotImplemented, "NotImplemented: GetBounds"]] }; MyViewReset: PROC[context: Context] ~ { SIGNAL WarningMessage[context, $MyViewReset, "NotImplemented: ViewReset"]; }; MyViewTranslateI: PROC[context: Context, x, y: INTEGER] ~ { SIGNAL WarningMessage[context, $MyViewTranslateI, "NotImplemented: ViewTranslateI"]; }; MyViewClip: PROC[context: Context, path: PathProc, oddWrap: BOOL, exclude: BOOL] ~ { SIGNAL WarningMessage[context, $MyViewClip, "NotImplemented: ViewClip"]; }; MyViewClipRectangleI: PROC[context: Context, x, y, w, h: INTEGER, exclude: BOOL] ~ { SIGNAL WarningMessage[context, $MyViewClipRectangleI, "NotImplemented: ViewClipRectangleI"]; }; MyGetTransformation: PROC[context: Context, from, to: CoordSys] RETURNS [Transformation] ~ { SIGNAL WarningMessage[context, $MyGetTransformation, "NotImplemented: GetTransformation"]; RETURN[ImagerTransformation.Scale[1.0]]; }; MyTransform: PROC[context: Context, v: VEC, from, to: CoordSys, vec: BOOL] RETURNS [VEC] ~ { SIGNAL WarningMessage[context, $MyTransform, "NotImplemented: Transform"]; RETURN[[0,0]]; }; MyMoveViewRectangle: PROC[context: Context, width, height, fromX, fromY, toX, toY: INTEGER] ~ { SIGNAL WarningMessage[context, $MyMoveViewRectangle, "NotImplemented: MoveViewRectangle"]; }; MyTestViewRectangle: PROC[context: Context, x, y, w, h: INTEGER] RETURNS [Visibility] ~ { SIGNAL WarningMessage[context, $MyTestViewRectangle, "NotImplemented: TestViewRectangle"]; RETURN[all] }; gargoyleClass: Class ~ NEW[ClassRep _ [ type: $Gargoyle, DoSave: ImagerState.StateDoSave, SetInt: ImagerState.StateSetInt, SetReal: ImagerState.StateSetReal, SetT: ImagerState.StateSetT, SetFont: ImagerState.StateSetFont, SetColor: ImagerState.StateSetColor, SetClipper: ImagerState.StateSetClipper, GetInt: ImagerState.StateGetInt, GetReal: ImagerState.StateGetReal, GetT: ImagerState.StateGetT, GetFont: ImagerState.StateGetFont, GetColor: ImagerState.StateGetColor, GetClipper: ImagerState.StateGetClipper, ConcatT: ImagerState.StateConcatT, Scale2T: ImagerState.StateScale2T, RotateT: ImagerState.StateRotateT, TranslateT: ImagerState.StateTranslateT, Move: ImagerState.StateMove, SetXY: ImagerState.StateSetXY, SetXYRel: ImagerState.StateSetXYRel, Show: MyShow, ShowText: MyShowText, StartUnderline: ImagerState.StateStartUnderline, MaskUnderline: ImagerState.StateMaskUnderline, CorrectMask: ImagerState.StateCorrectMask, CorrectSpace: ImagerState.StateCorrectSpace, Space: ImagerState.StateSpace, SetCorrectMeasure: ImagerState.StateSetCorrectMeasure, SetCorrectTolerance: ImagerState.StateSetCorrectTolerance, Correct: ImagerState.StateCorrect, DontCorrect: ImagerState.StateDontCorrect, SetGray: ImagerState.StateSetGray, SetSampledColor: ImagerState.StateSetSampledColor, SetSampledBlack: ImagerState.StateSetSampledBlack, ShowBackward: MyShowBackward, MaskFill: MyMaskFill, MaskStroke: MyMaskStroke, ShowAndFixedXRel: MyShowAndFixedXRel, MaskDashedStroke: MyMaskDashedStroke, MaskRectangle: MyMaskRectangle, MaskRectangleI: MyMaskRectangleI, MaskVector: MyMaskVector, MaskPixel: MyMaskPixel, MaskBitmap: MyMaskBitmap, DrawBitmap: MyDrawBitmap, DrawPixels: MyDrawPixels, DoIfVisible: MyDoIfVisible, DoWithBuffer: MyDoWithBuffer, DrawObject: MyDrawObject, Clip: ImagerState.StateClip, ClipRectangle: ImagerState.StateClipRectangle, ClipRectangleI: ImagerState.StateClipRectangleI, GetCP: ImagerState.StateGetCP, GetBounds: MyGetBounds, ViewReset: MyViewReset, ViewTranslateI: MyViewTranslateI, ViewClip: MyViewClip, ViewClipRectangleI: MyViewClipRectangleI, GetTransformation: MyGetTransformation, Transform: MyTransform, MoveViewRectangle: MyMoveViewRectangle, TestViewRectangle: MyTestViewRectangle, propList: NIL ]]; END. GGFromImagerImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Michael Plass, October 19, 1985 3:55:31 pm PDT Pier, April 21, 1987 6:24:06 pm PDT Bier, February 18, 1987 11:10:03 pm PST state.T _ ImagerTransformation.Scale[72/0.0254]; Takes a complex name like "xerox/pressfonts/Helvetica-MIR" and a font size and returns components. May already have a simple name like xerox/tiogafonts/Helvetica10I. KAP August 8, 1986 A kludge for the moment to avoid segments with sampled colors correctMeasureX: REAL _ ImagerBackdoor.GetReal[context, $correctMX]; ipSlice _ GGSlice.MakeIPSliceFromMaster[ipMaster, NIL, NIL, NIL, TRUE]; ipSlice _ GGSlice.MakeIPSliceFromMaster[ipMaster, NIL, NIL, NIL, TRUE]; ShowText: ImagerRasterPrivate.RasterShowText, Κ!˜code™Kšœ<™œ œœœ˜’Kšœ#œ˜'Kšœœ˜!Kšœ!œ˜%Kšœœ ˜Kšœ œ ˜šžœœ˜šœ œœ˜šœ œœ˜šœœ˜šœœ˜ Kšœ0˜0Kšœ&˜&K˜—šœ˜Kšœ0˜0Kšœ3œ˜8Kšœ/˜/Kšœ-˜-K˜—K˜—Kšœ1˜5Kšœ˜—šœŸ@˜GKšœSœ˜]Kšœ˜—Kšœ œ˜ Kšœœœ/œ˜KKšœ5˜9Kšœ œ˜Kšœ˜—Kšœ˜—šžœœœ˜Kšœ ˜ Kšœ(˜(Kšœ˜Kšœ˜—šžœœœ˜Kšœ œœ1˜EKšœ8œ˜=Kšœ/˜/Kšœ˜Kšœ˜—šžœœœ˜!Kšœ œœ1˜EKšœVœ˜[Kšœ/˜/Kšœ˜Kšœ˜—šžœœ œœ˜&Kšœ œœ1˜EKšœJœ˜OKšœ/˜/Kšœ˜Kšœ˜—šžœœ œ˜Kšœ œœ1˜EKšœEœ˜JKšœ/˜/Kšœ˜Kšœ˜—Kšœ=˜=Kšœ ˜ Kšœ˜Kšœ˜K˜—šžœœ.œ˜CKšž œ-˜6K˜K˜—šž œœœœœœœ˜]K–>[s: REF READONLY TEXT, start: NAT _ 0, len: NAT _ 32767]šœL˜LK˜K˜—šž œœœœ˜BKšœ˜Kšœ7˜7Kšœ œ)˜8šœœ˜$Kšœ˜Kšœ œ˜"Kšœœ2˜DKšœœ/™DKšœ6˜6Kšœ7˜7Kšœ3œ˜:Kš œ7œ œœ#œ˜uKšœk˜kK–T[m: ImagerTransformation.Transformation, n: ImagerTransformation.Transformation]šœœŸ(˜FKšœ6˜6Kšœ:œ˜?Kšœ/˜/Kšœ,˜,K˜—K–%[context: Imager.Context, v: VEC]šœ/˜/Kšœ˜K˜—šžœœ+˜?KšœJ˜PK˜K˜—šž œœ,œ˜EKšœ œ˜"Kšœ˜Kšœ&œ˜JKšœ œœD˜Zšœœ˜$KšœHœœ˜UKšœ1˜1Kšœ,˜,Kšœ˜—Kšœ˜K˜—šž œœ+œ˜FKšœ˜K˜Kšœ œ˜"Kšœ˜Kšœ&œ˜Jšœœ˜$Kšœ:˜:Kšœ$œŸ˜:Kšœœœ ˜5KšœFœ˜fKšœ,˜,Kšœ˜—Kšœ˜K˜—šžœœ/œ œœœœœ˜‰Kšœ˜K˜Kšœ œ˜"Kšœ˜Kšœœ ˜@Kšœ&œ˜Jšœœ˜$Kšœ˜Kšœ2œ˜9Kšœ0œ˜BKšœ$œŸ˜:Kšœœœ ˜5KšœB˜Bšœœœ˜ Kšœ˜Kšœ˜—Kšœ0œ˜RKšœ,˜,Kšœ˜—Kšœ˜K˜—šžœœ,œ˜MKšœQ˜WK˜K˜—šžœœ$˜9šœ˜Kšœ+˜+Kšœ2˜2Kšœ˜—Kšœœ˜!Kšœ˜K˜—šžœœœ˜AKšœ'˜'Kšœ˜K˜—šž œœœ˜5Kšœ*˜*Kšœœ˜#Kšœ˜K˜—šž œœ&˜7šž œœ˜,Kšœ˜K˜—Kšœ œ˜"K˜K˜Kšœ.˜.K˜Kšœ#˜#Kšœ6˜6Kšœ=œ ˜LKšœ*˜*Kšœ˜K˜—šž œœ6œ$œ˜všž œœ˜+KšœB˜BK˜—Kšœœœ˜#Kšœœ˜Kšœ œ˜"Kšœ˜Kšœ˜K˜K˜KšœD˜JK–’[context: Imager.Context, base: LONG POINTER, wordsPerLine: NAT, sMin: NAT, fMin: NAT, sSize: NAT, fSize: NAT, tx: INTEGER _ 0, ty: INTEGER _ 0]šœ œœ˜KšœN˜NKšœ-˜-Kšœ˜Kšœ œ˜'Kšœœœ ˜"Kšœ/œ˜4Kš œ2œœœœ™GKšœ*˜*Kšœ˜K˜—šž œœ7œ$œ˜wšž œœ˜+KšœB˜BK˜—Kšœœœ˜#Kšœœ˜Kšœ œ˜"Kšœ˜Kšœ˜K˜K˜Kšœ@˜FK–’[context: Imager.Context, base: LONG POINTER, wordsPerLine: NAT, sMin: NAT, fMin: NAT, sSize: NAT, fSize: NAT, tx: INTEGER _ 0, ty: INTEGER _ 0]šœ œœ˜KšœN˜NKšœ-˜-Kšœ˜Kšœ œ˜'Kšœœœ ˜"Kšœ/œ˜4Kš œ2œœœœ™GKšœ*˜*Kšœ˜K˜—šž œœUœ$œ˜•KšœF˜LK˜K˜—šž œœ)œ˜EKšœH˜NK˜K˜—šžœœœœ˜eKšœJ˜PK˜K˜—šž œœ-œœ˜ZKšœG˜MK˜K˜—šž œœœ˜