From e5c2a971644746818f8764481c60c4c5cf1a80c4 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Thu, 17 Dec 2020 22:29:25 +0100 Subject: Moved path builder in a dedicated file --- path/builder.mli | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 path/builder.mli (limited to 'path/builder.mli') diff --git a/path/builder.mli b/path/builder.mli new file mode 100755 index 0000000..d99e0b2 --- /dev/null +++ b/path/builder.mli @@ -0,0 +1,33 @@ +(** Signature for points *) +module type P = sig + type t + + val get_coord : t -> Gg.v2 +end + + +module Make(P:P) : sig + + type t + + (** Create an empty path *) + val empty: t + + val add_point + : P.t -> t -> t + + (** Replace the last alement in the path by the one given in parameter *) + val replace_last + : P.t -> t -> t + + (** Retrieve the last element, if any *) + val peek + : t -> P.t option + + (** Retrieve the last element, if any *) + val peek2 + : t -> (P.t * P.t) option + + val get + : t -> P.t list * Shapes.Bezier.t list +end -- cgit v1.2.3