aboutsummaryrefslogtreecommitdiff
path: root/script.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2020-12-19 19:59:17 +0100
committerSébastien Dailly <sebastien@chimrod.com>2020-12-19 19:59:17 +0100
commit0faaa5fda396f0eca6bebf69f3624a344278fa6e (patch)
treecbca5d2f306506c0896f83b8bdd45b777c78aa35 /script.ml
parente5c2a971644746818f8764481c60c4c5cf1a80c4 (diff)
First commit
Diffstat (limited to 'script.ml')
-rwxr-xr-xscript.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/script.ml b/script.ml
index f7db9d3..be7fe8e 100755
--- a/script.ml
+++ b/script.ml
@@ -45,6 +45,7 @@ let canva
(* Mouse events *)
let mouse = Brr_note_kit.Mouse.on_el
+ ~normalize:false
(fun x y -> (x, y)) element in
let click =
@@ -198,11 +199,16 @@ let on_change canva mouse_position state =
state.current
in
+ let path = Point.get @@ Path_Builder.draw current in
+ stroke context path;
+
+(*
let points, beziers = Path_Builder.get current in
let path = draw_path area (points) beziers in
stroke context path;
+*)
List.iter state.paths
~f:(fun path ->