<> <> DIRECTORY Imager USING [Context, Color], Complex USING [Vec], FitBasic USING [Handle], FitStateUtils USING [SampleProc], IO USING [STREAM]; FitIO: CEDAR DEFINITIONS = { Handle: TYPE = FitBasic.Handle; Context: TYPE = REF ContextRec; ContextRec: TYPE = RECORD[ imager: Imager.Context, magnify: REAL, position: Complex.Vec, feedback: Feedback, logActions: BOOLEAN _ TRUE, log: IO.STREAM ]; Feedback: TYPE = REF FeedbackRec; FeedbackRec: TYPE=RECORD [ color: Imager.Color, sampleSize: REAL _ 1, jointSize: REAL _ 2, nodeLength: REAL _ 2, nodeLineWidth: REAL _ 0, lineWidth: REAL _ 0 --for DrawSamples and DrawContour ]; GetContext: PROC RETURNS [Context]; SetContext: PROC[context: Context]; TTY: PROC RETURNS[IO.STREAM] = INLINE {RETURN[GetContext[].log]}; <<>> <> <> <> <> <> <> <> <> <> <> <> << >> <> SetFeedback: PROC[feedback: Feedback]; DrawSamples: PROC [handle: Handle, all: BOOLEAN _ FALSE, fill: BOOLEAN _ FALSE]; <> MarkSamples: PROC [handle: Handle, all: BOOLEAN _ FALSE]; MarkNodes: PROC [handle: Handle, all: BOOLEAN _ FALSE]; MarkJoints: PROC [handle: Handle, all: BOOLEAN _ FALSE]; --joints between the cubic pieces DrawContour: PROC [handle: Handle, all: BOOLEAN _ FALSE, fill: BOOLEAN _ FALSE]; MarkNode: FitStateUtils.SampleProc; --actual procedures used by MarkSamples and MarkNodes MarkSample: FitStateUtils.SampleProc; NoLog: SIGNAL; StartLog: PROC [stream: IO.STREAM _ NIL]; <> StopLog: PROC[close: BOOLEAN _ TRUE]; <> <> <> MagnifyData: PROC[scale: REAL]; <> <> PositionData: PROC[trans: Complex.Vec]; <> <> <> MagnifyPoint: PROC [p: Complex.Vec] RETURNS[Complex.Vec]; --magnify and position UnMagnifyPoint: PROC [p: Complex.Vec] RETURNS[Complex.Vec]; --undo magnify and position }.