-- DebugWriteString.mesa -- last modified by McCreight, March 23, 1983 10:45 AM -- to allow variable layer -- written by Hilton, August 4, 1982 1:42 PM DIRECTORY ChipUserInt, ppdddefs, ppddefs, ppdefs, ppfeeddefs, String, WriteStringDefs; DebugWriteString: PROGRAM IMPORTS ChipUserInt, ppdddefs, ppddefs, ppdefs, ppfeeddefs, WriteStringDefs = BEGIN OPEN ChipUserInt, ppdddefs, ppddefs, ppdefs, String, WriteStringDefs; ob: obPtr _ NIL; min: Point _ [0,0]; DO ENABLE Punt => GOTO Exit; PutRect: PROCEDURE [r: Rect] = BEGIN realRect: Rect _ [ x1: markPnt.x+(scale*r.x1)/8, y1: markPnt.y+(scale*r.y1)/8, x2: markPnt.x+(scale*r.x2)/8, y2: markPnt.y+(scale*r.y2)/8]; ourLp _ insertList[ourLp, makeList[p: makeRect[x: realRect.x2-realRect.x1, y: realRect.y2-realRect.y1, l: IF ppfeeddefs.fbAr=@ppfeeddefs.fbAr2 THEN rectLev ELSE favLev], x: realRect.x1, y: realRect.y1, o: 0, refl: 0]]; END; -- of PutRect -- scale: INTEGER _ RequestInteger[ "Scale? (16 = huge, 1 = small)"L]; s: STRING _ RequestString[s1: "String to be put in selected layer at mark: "L, lowerCaseOK: TRUE]; repaintRect: Rect _ [x1: markPnt.x, y1: markPnt.y, x2: markPnt.x, y2: markPnt.y]; ourLp: listPtr _ NIL; StringToRectangles[s, PutRect ! NoFont => {Explain["I need the file ""[indigo]WriteString>font.chip"", please!"]; EXIT}]; ReleaseFont[]; FreeString[s]; [ob, min] _ MakeCell[ourLp]; DrawOb[ob, min]; ENDLOOP; EXITS Exit => NULL; END. -- of DebugWriteString -- (635)\f7