From 561d0f0155f4906d90eb7e73a3ff9cb28909126f Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 5 Feb 2021 09:08:39 +0100 Subject: Update project structure --- script.it/layer/repr.ml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 script.it/layer/repr.ml (limited to 'script.it/layer/repr.ml') diff --git a/script.it/layer/repr.ml b/script.it/layer/repr.ml new file mode 100755 index 0000000..552e2b7 --- /dev/null +++ b/script.it/layer/repr.ml @@ -0,0 +1,49 @@ +module type PRINTER = sig + + type t + + val create: unit -> t + + (* Start a new path. *) + val move_to: Gg.v2 -> t -> t + + val line_to: Gg.v2 -> t -> t + + (** [quadratic_to ctrl0 ctrl1 p1] create a quadratic curve from the current + point to [p1], with control points [ctrl0] and [ctrl1] *) + val quadratic_to: Gg.v2 -> Gg.v2 -> Gg.v2 -> t -> t + + (** Request for the path to be closed *) + val close: t -> t + +end + +module type ENGINE = sig + type t + + type point = Path.Point.t + + type repr + + val get + : t -> repr + + val create_path + : (repr -> repr) -> t + + val start + : point -> point -> t -> t + + val line_to + : (point * point) -> (point * point) -> t -> t + + val quadratic_to + : (point * Gg.v2 * Gg.v2 * point) + -> (point * Gg.v2 * Gg.v2 * point) + -> t + -> t + + val stop + : t -> t + +end -- cgit v1.2.3