aboutsummaryrefslogtreecommitdiff
path: root/path/builder.mli
diff options
context:
space:
mode:
Diffstat (limited to 'path/builder.mli')
-rwxr-xr-xpath/builder.mli24
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