aboutsummaryrefslogtreecommitdiff
path: root/script.ml
diff options
context:
space:
mode:
Diffstat (limited to 'script.ml')
-rwxr-xr-xscript.ml16
1 files changed, 4 insertions, 12 deletions
diff --git a/script.ml b/script.ml
index 595d975..d501b10 100755
--- a/script.ml
+++ b/script.ml
@@ -197,12 +197,9 @@ let on_change canva mouse_position state =
end
in
- let path = Paths.CanvaRepr.get
- @@ Paths.Path_Builder.repr
- current
- (module Paths.CanvaRepr)
- (Paths.CanvaRepr.create_path (fun p -> fill context p)) in
- stroke context path;
+ let repr = `Wire in
+
+ Paths.to_canva (module Paths.Path_Builder) current context repr;
List.iter state.paths
~f:(fun path ->
@@ -221,12 +218,7 @@ let on_change canva mouse_position state =
| _ -> ()
in
- let path = Paths.CanvaRepr.get
- @@ Paths.Fixed.repr
- path
- (module Paths.CanvaRepr)
- (Paths.CanvaRepr.create_path (fun p -> fill context p)) in
- stroke context path;
+ Paths.to_canva (module Paths.Fixed) path context repr
);
()