-- Spline.mesa
-- Last changed by Doug Wyatt, September 1, 1982 12:03 pm
DIRECTORY
GraphicsBasic USING [Path];
Spline: CEDAR DEFINITIONS = {
Ref: TYPE = REF Rep;
Rep: TYPE;
New: PROC RETURNS[Ref];
-- Return a new object which will hold the knots of a spline
Reset: PROC[self: Ref];
-- Forget all the knots in the current spline
Knot: PROC[self: Ref, x,y: REAL];
-- Add a knot to the current spline
Enter: PROC[self: Ref, path: GraphicsBasic.Path,
cyclic: BOOLEAN ← FALSE, flush: BOOLEAN ← TRUE];
-- Enter the current spline into the given path
-- by making a series of calls on MoveTo and CurveTo,
-- then reset the spline to be empty.
-- cyclic => make a closed, cyclic spline.
-- flush => flush the path before entering the spline
}.