<> <> <> <> DIRECTORY Imager USING [Context, Color], Cubic USING [Bezier], Complex USING [VEC], FitBasic USING [Handle, SampleHandle], 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 ]; TTY: PROC[ctx: Context] RETURNS[IO.STREAM] = INLINE {RETURN[ctx.log]}; <<>> <> <> <> <> <> <> <> <> <> <> <> << >> <> SetFeedback: PROC[ctx: Context, feedback: Feedback]; DrawSamples: PROC [ctx: Context, handle: Handle, all: BOOLEAN _ FALSE, fill: BOOLEAN _ FALSE]; <> MarkSamples: PROC [ctx: Context, handle: Handle, all: BOOLEAN _ FALSE]; MarkNodes: PROC [ctx: Context, handle: Handle, all: BOOLEAN _ FALSE]; MarkJoints: PROC [ctx: Context, handle: Handle, all: BOOLEAN _ FALSE]; --joints between the cubic pieces DrawContour: PROC [ctx: Context, handle: Handle, all: BOOLEAN _ FALSE, fill: BOOLEAN _ FALSE]; <> MarkNode: PROC[ctx: Context, s: FitBasic.SampleHandle]; MarkSample: PROC[ctx: Context, s: FitBasic.SampleHandle]; <> MarkJoint: PROC[ctx: Context, pt: Complex.VEC]; DrawCubic: PROC[ctx: Context, cubic: Cubic.Bezier]; NoLog: SIGNAL; StartLog: PROC [ctx: Context, stream: IO.STREAM _ NIL]; <> StopLog: PROC[ctx: Context, close: BOOLEAN _ TRUE]; <> <> <> MagnifyData: PROC[ctx: Context, scale: REAL] = INLINE {ctx.magnify _ scale}; <> <> PositionData: PROC[ctx: Context, trans: Complex.VEC] = INLINE {ctx.position _ trans}; <> <> <> MagnifyPoint: PROC [ctx: Context, p: Complex.VEC] RETURNS[Complex.VEC]; --magnify and position UnMagnifyPoint: PROC [ctx: Context, p: Complex.VEC] RETURNS[Complex.VEC]; --undo magnify and position }.