aboutsummaryrefslogtreecommitdiff
path: root/path
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2020-12-22 21:42:55 +0100
committerSébastien Dailly <sebastien@chimrod.com>2020-12-22 21:42:55 +0100
commit6354358caa1dfbf2fe1d481f6ac5fba3775938fc (patch)
tree4fd24d821f37a0626754f6f5078ac77ffe5c469c /path
parent1f1f13a3f02e7f5f5da5926a402d53f2ccbfe536 (diff)
Blog integration
Diffstat (limited to 'path')
-rwxr-xr-xpath/builder.ml12
-rwxr-xr-xpath/builder.mli4
2 files changed, 7 insertions, 9 deletions
diff --git a/path/builder.ml b/path/builder.ml
index b77c60a..3ccad9c 100755
--- a/path/builder.ml
+++ b/path/builder.ml
@@ -328,7 +328,6 @@ module Make(Point:P) = struct
Repr.stop repr
end
-
let box
: bezier -> Gg.box2
= fun bezier ->
@@ -338,7 +337,6 @@ module Make(Point:P) = struct
|> (fun b -> Gg.Box2.add_pt b bezier.ctrl0)
|> (fun b -> Gg.Box2.add_pt b bezier.ctrl1)
-
let distance
: Gg.v2 -> fixedPath -> float option =
fun point beziers ->
@@ -353,6 +351,7 @@ module Make(Point:P) = struct
begin match Gg.Box2.mem point box with
| false -> res
| true ->
+ (* TODO Evaluate the normal *)
res
end
| Curve bezier ->
@@ -373,12 +372,9 @@ module Make(Point:P) = struct
| None -> Some distance
| Some d -> if d < distance then res else (Some distance)
end
-
-
)
-
-
-
-
+ let id
+ : fixedPath -> int
+ = fun {id; _} -> id
end
diff --git a/path/builder.mli b/path/builder.mli
index 42f433e..557cdfa 100755
--- a/path/builder.mli
+++ b/path/builder.mli
@@ -32,7 +32,6 @@ end
module Make(P:P) : sig
- type bezier
type t
type fixedPath
@@ -72,4 +71,7 @@ module Make(P:P) : sig
(** Return the shortest distance between the mouse and a point *)
val distance
: Gg.v2 -> fixedPath -> float option
+
+ val id
+ : fixedPath -> int
end