<<>> <> <> <> <> <> <> <> DIRECTORY Imager USING [Rectangle, VEC, Transformation], ImagerPath USING [MoveToProc, CurveToProc], CubicSplines USING [CoeffsSequence], Cubic2 USING [Bezier]; CubicPaths: CEDAR DEFINITIONS ~ BEGIN VEC: TYPE = Imager.VEC; Bezier: TYPE = Cubic2.Bezier; Path: TYPE = REF PathRec; PathRec: TYPE = RECORD[bounds: Imager.Rectangle, cubics: REF PathSequence]; PathSequence: TYPE = RECORD[bezier: SEQUENCE length: NAT OF Bezier]; PathFromCubic: PROC [coeffs: CubicSplines.CoeffsSequence, newBounds: BOOL ¬ TRUE] RETURNS [Path]; <<>> EnumeratePath: PROC [path: Path, moveTo: ImagerPath.MoveToProc, curveTo: ImagerPath.CurveToProc]; <> <> <<>> PointProc: TYPE = PROC [p: VEC] RETURNS [stop: BOOLEAN ¬ FALSE]; <<>> WalkPath: PROC [path: Path, tol: REAL, proc: PointProc]; <> <<>> PointOnPath: PROC [pt: VEC, path: Path, tol: REAL] RETURNS [BOOLEAN]; <<>> TranslatePath: PROC [path: Path, offset: VEC]; <<>> TransformPath: PROC [path: Path, tranformation: Imager.Transformation, newBounds: BOOL ¬ TRUE]; <<>> UpdateBounds: PROC [path: Path]; <> <<>> ClosestPoint: PROC [pt: VEC, path: Path] RETURNS[VEC]; <<>> CopyPath: PROC [path: Path] RETURNS[Path]; <<>> ReversePath: PROC [path: Path]; <> <<>> ClosestPointAnalytic: PROC[pt: VEC, path: Path, tolerance: REAL ¬ 9999.0] RETURNS [closest: VEC, success: BOOL]; <> <<>> GetParam: PROC [bezier: Bezier, pt: VEC] RETURNS [u: REAL]; <> <<>> CubicMeetsLine: PROC [bezier: Bezier, a, b, c: REAL] RETURNS [points: ARRAY [0..2] OF VEC, hitCount: [0..3], tangency: ARRAY [0..2] OF BOOL]; <> <<>> END.