aboutsummaryrefslogtreecommitdiff
path: root/layer/linePrinter.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-01-11 11:33:32 +0100
committerSébastien Dailly <sebastien@chimrod.com>2021-01-11 13:55:43 +0100
commit42c3c122c4f53dd68bcdd89411835887c3ae0af9 (patch)
tree856a54955c4bf1648e7f5f1cea809e5601b60c7d /layer/linePrinter.ml
parent979be5f588a1ffd6e1d060cd794e87526d517b7a (diff)
Outline module
Diffstat (limited to 'layer/linePrinter.ml')
-rwxr-xr-xlayer/linePrinter.ml68
1 files changed, 0 insertions, 68 deletions
diff --git a/layer/linePrinter.ml b/layer/linePrinter.ml
deleted file mode 100755
index d223760..0000000
--- a/layer/linePrinter.ml
+++ /dev/null
@@ -1,68 +0,0 @@
-module Make(Repr: Repr.PRINTER) = struct
-
- type point = Path.Point.t
-
- let mark point path =
- let open Gg.V2 in
- let point = Path.Point.get_coord point in
-
- let dist = 5.
- and dist' = -5. in
-
- let path = Repr.move_to (point - (of_tuple (dist, dist))) path
- |> Repr.line_to ( point + (of_tuple (dist, dist)))
- |> Repr.move_to (point + (of_tuple (dist', dist)))
- |> Repr.line_to ( point + (of_tuple (dist, dist')))
- in
- path
-
-
- type t =
- { path: (Repr.t)
- }
-
- type repr = Repr.t
-
- let create_path
- : 'b -> t
- = fun _ ->
- { path = Repr.create ()
- }
-
- let start
- : point -> point -> t -> t
- = fun p1 _ { path } ->
- let path = mark p1 path in
- { path
- }
-
- let line_to
- : (point * point) -> (point * point) -> t -> t
- = fun (p0, p1) _ {path} ->
- let path = Repr.move_to (Path.Point.get_coord p0) path
- |> Repr.line_to (Path.Point.get_coord p1)
- |> mark p1 in
- { path
- }
-
- let quadratic_to
- : (point * Gg.v2 * Gg.v2 * point) -> (point * Gg.v2 * Gg.v2 * point) -> t -> t
- = fun (p0, ctrl0, ctrl1, p1) _ {path} ->
-
- let path = Repr.move_to (Path.Point.get_coord p0) path
- |> Repr.quadratic_to ctrl0 ctrl1 (Path.Point.get_coord p1)
- |> mark p1 in
-
- { path = path }
-
- let stop
- : t -> t
- = fun path -> path
-
-
- let get
- : t -> Repr.t
- = fun {path; _} ->
- path
-
-end