aboutsummaryrefslogtreecommitdiff
path: root/script.it/state/selection.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-05-24 22:13:19 +0200
committerSébastien Dailly <sebastien@dailly.me>2022-02-07 16:22:43 +0100
commit38cf58ac5e1adb38a1b99ea7cdda19ef7b5e12bf (patch)
tree4f94bff126e1dff186e0dafe5fca86657233acb1 /script.it/state/selection.mli
parent1a53943340d068a1dbcef2f006e44905bab47bff (diff)
Refactor
Diffstat (limited to 'script.it/state/selection.mli')
-rwxr-xr-xscript.it/state/selection.mli33
1 files changed, 33 insertions, 0 deletions
diff --git a/script.it/state/selection.mli b/script.it/state/selection.mli
new file mode 100755
index 0000000..9792a2d
--- /dev/null
+++ b/script.it/state/selection.mli
@@ -0,0 +1,33 @@
+type 'a selection =
+ | Path of 'a
+ | Point of ('a * Path.Point.t)
+
+type t = int selection
+
+val threshold : float
+
+(** Return the closest path from the list to a given point.
+
+ The path is returned with all thoses informations :
+ - The point in the path
+ - The path itself
+ - The starting point from the path
+ - The end point in the path
+
+*)
+val get_from_paths
+ : (float * float) -> Outline.t list -> float * (Gg.v2 * Outline.t * Path.Point.t * Path.Point.t) option
+
+val select_path
+ : Outline.t -> t
+
+(** Check for selecting a point on the given outline.
+
+ If no point is available, select the path.
+
+*)
+val select_point
+ : Outline.t -> Gg.v2 -> t
+
+val find_selection
+ : int selection -> Outline.t list -> Outline.t selection option