diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2020-12-20 06:38:04 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2020-12-20 06:38:04 +0100 |
commit | 986a36b3728eba40789d6063997dafda67b519ec (patch) | |
tree | f0c26704df237b5ccad380596c49a3b13eeac14f /path/builder.mli | |
parent | 01c0f5faf98b78d44aaae7f70e0cf4229ad8ed91 (diff) |
Update
Diffstat (limited to 'path/builder.mli')
-rwxr-xr-x | path/builder.mli | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/path/builder.mli b/path/builder.mli index 64617fa..17c1a2a 100755 --- a/path/builder.mli +++ b/path/builder.mli @@ -6,9 +6,15 @@ module type P = sig val get_coord : t -> Gg.v2 + (** Copy a point and all thoses properties to the given location *) val copy : t -> Gg.v2 -> t - type 'a repr +end + +module type REPR = sig + type t + + type 'a repr val create_path : unit -> 'a repr @@ -21,18 +27,17 @@ module type P = sig : t -> 'a repr -> 'a repr val quadratic_to - : t -> t -> t -> t -> 'a repr -> 'a repr + : t -> Gg.v2 -> Gg.v2 -> t -> 'a repr -> 'a repr val stop : 'a repr -> 'a repr end - module Make(P:P) : sig type bezier = - { p0:P.t (* The starting point *) - ; p1:P.t (* The end point *) + { p0:P.t (* The starting point *) + ; p1:P.t (* The end point *) ; ctrl0:Gg.v2 (* The control point *) ; ctrl1:Gg.v2 } (* The control point *) @@ -62,6 +67,11 @@ module Make(P:P) : sig val points_to_beziers : P.t list -> Shapes.Bezier.t array -> bezier array - val draw - : t -> 'a P.repr + module Draw(Repr:REPR with type t = P.t) : sig + + (** Represent the the current path *) + val draw + : t -> 'a Repr.repr + end + end |