<> <> <> <> <> DIRECTORY Cubic USING [Bezier], Complex USING [VEC], Seq USING [ComplexSequence,JointSequence], FitBasic USING [Handle, JointType]; FitState: CEDAR DEFINITIONS = BEGIN Handle: TYPE = FitBasic.Handle; <> <> Create: PROC RETURNS [handle: Handle]; Undo: PROC[handle: Handle]; --reverses the last operation SetClosed: PROC [handle: Handle, closed: BOOLEAN] = INLINE {handle.closed _ closed}; GetClosed: PROC [handle: Handle] RETURNS [BOOLEAN] = INLINE {RETURN[handle.closed]}; SetMinDist: PROC [handle: Handle, minDist: REAL _ 0]= INLINE {handle.minDist _ minDist}; GetMinDist: PROC [handle: Handle] RETURNS [REAL] = INLINE {RETURN[handle.minDist]}; <> DataType: TYPE = {samples, links, joints, contours}; ResetData: PROC[handle: Handle, type: DataType, all: BOOLEAN _ FALSE]; ScaleData: PROC[handle: Handle, scale: REAL, type: DataType, all: BOOLEAN _ FALSE]; TranslateData: PROC[handle: Handle, trans: Complex.VEC, type: DataType, all: BOOLEAN _ FALSE]; <> AddSample: PROC[handle: Handle, x,y: REAL, joint: FitBasic.JointType _ none, tanIn,tanOut: Complex.VEC _ [0,0]]; --adds to the end of the current list RemoveSample: PROC[handle: Handle]; --unlinks the selected sample InsertBeforeSample: PROC[handle: Handle, x,y: REAL, joint: FitBasic.JointType _ none, tanIn,tanOut: Complex.VEC _ [0,0]]; --inserts before the selected sample <> AddLink: PROC[handle: Handle, b: Cubic.Bezier]; <> SetJoint: PROC[handle: Handle, index: NAT, joint: FitBasic.JointType _ potential, tanIn,tanOut: Complex.VEC _ [0,0]]; <> NewContour: PROC[handle: Handle]; -- Makes an empty contour and selects it NextContour: PROC[handle: Handle]; -- Moves to the next contour. <<>> <> <> <> <<>> CurrentJoints: PROC[handle: Handle] RETURNS[joints: Seq.JointSequence, tangents: Seq.ComplexSequence]; CurrentSamples: PROC[handle: Handle] RETURNS[Seq.ComplexSequence]; <> EnumerateLinks: PROC[handle: Handle, newContour: PROC[x,y: REAL], newCubic: PROC[c: Cubic.Bezier]]; EnumerateSamples: PROC[handle: Handle, newContour: PROC[x,y: REAL], newSample: PROC[x,y: REAL]]; CountContours: PROC[handle: Handle] RETURNS [INT]; END.