DIRECTORY Cubic USING [Bezier], Complex USING [Vec], Seq USING [ComplexSequence,NatSequence], FitBasic USING [Handle, SampleHandle]; FitStateUndo: CEDAR DEFINITIONS = BEGIN Undo: PROC[handle: Handle]; --reverses the last operation DataType: TYPE = {samples, links, nodes, cusps, contour} RestoreData: PROC[handle: Handle, type: DataType, all: BOOLEAN]; --copies old data from undo InvertTransform: PROC [handle: Handle]; --xform and all flag off of undo RemoveLast: PROC [handle: Handle, type: DataType]; --narrow, then call corresponding routine RestoreLast: PROC [handle: Handle, type: DataType]; --narrow, then call corresponding routine RestoreCurrentContour: PROC[handle: Handle]; --keeps a ref to the last contour on the undo RestoreClosed: PROC[handle: Handle]; RestoreMinDist: PROC[handle: Handle]; END. (FitStateUndo.mesa Maureen Stone June 22, 1984 9:58:05 am PDT Note special case of 0 or nearly 0, (ImagerTransform.CloseEnough) ResetData: PROC[handle: Handle, type: DataType]; StartSamples: PROC[handle: Handle, x,y: REAL]; --RestoreData[handle, samples, FALSE] ScaleData: PROC[handle: Handle, scale: REAL, type: DataType]; TranslateData: PROC[handle: Handle, trans: Complex.Vec, type: DataType]; above with all flag=TRUE ResetAllData: PROC[handle: Handle, type: DataType]; ScaleAllData: PROC[handle: Handle, scale: REAL, type: DataType]; TranslateAllData: PROC[handle: Handle, trans: Complex.Vec, type: DataType]; these need no special procs to provide function, only to narrow the undo data AddSample: PROC[handle: Handle, x,y: REAL]; InsertBefore: PROC[handle: Handle, x,y: REAL, s: FitBasic.SampleHandle]; RemoveSample: PROC[handle: Handle, s: FitBasic.SampleHandle]; AddLink: PROC[handle: Handle, b: Cubic.Bezier]; InsertBefore: PROC[handle: Handle, x,y: REAL, link: FitBasic.LinkHandle]; RemoveLink: PROC[handle: Handle, link: FitBasic.LinkHandle]; AddNode: PROC[handle: Handle, index: NAT, tan: Complex.Vec _ [0,0]]; DeleteNode: PROC[handle: Handle, index: NAT]; AddCusp: PROC[handle: Handle, index: NAT, tan: Complex.Vec _ [0,0]]; DeleteCusp: PROC[handle: Handle, index: NAT]; AddContour: PROC[handle: Handle]; -- Makes a new contour and selects it NextContour: PROC[handle: Handle]; -- Moves to the next contour. Closed: PROC [handle: Handle, closed: BOOLEAN _ TRUE] RETURNS [was: BOOLEAN]; MinDist: PROC [handle: Handle, minDist: REAL _ 0] RETURNS [was: REAL]; Ê’˜Jšœ™Jšœ*™*šÏk ˜ Jšœœ ˜Jšœœ˜Jšœœ˜(Jšœ œ˜&J˜—Jšœœ˜!Jš˜JšÏnœœÏc˜9J˜Jšœ œ*˜8Jš ž œœ&œÐciÏiœ˜]JšœA™AšžœœŸ ˜HJšž œœ!™0Jšž œœœŸ%™TJšž œœœ™=Jšž œœ5™HJšœ™Jšž œœ!™3Jšž œœœ™@Jšžœœ5™K—J˜JšœM™MJšž œœ#Ÿ)˜\šž œœ#Ÿ)˜]Jšž œœœ™+Jšž œœœ™HJšž œœ+™=Jšžœœ"™/Jšž œœœ™IJšž œœ,™<—˜Jšžœœœ™DJšž œœœ™-Jšžœœœ™DJšž œœœ™-J˜—šžœœŸ-˜ZJšž œœŸ%™GJšž œœŸ™@—Jšž œœ˜$šžœœ˜%Jš žœœœœœœ™MJš žœœœœœ™F—J˜J˜J˜Jšœ˜—…—6 ð