(** Signature for points *) module type P = sig type t val empty : t val get_coord : t -> Gg.v2 (** Copy a point and all thoses properties to the given location *) val copy : t -> Gg.v2 -> t end module type REPR = sig type t type 'a repr (* Start a new path. *) val start : t -> 'a repr -> 'a repr val line_to : t -> t -> 'a repr -> 'a repr val quadratic_to : t -> Gg.v2 -> Gg.v2 -> t -> 'a repr -> 'a repr val stop : 'a repr -> 'a repr 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 module Draw(Repr:REPR with type t = P.t) : sig (** Represent the the current path *) val draw : t -> 'a Repr.repr -> 'a Repr.repr end end