diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-01 16:48:23 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-01 16:48:23 +0100 |
commit | 74cd42c5cae6644914334448e198d562f4145511 (patch) | |
tree | d502e0798a04566c16d345c194ce725330631145 /script.ml | |
parent | af88c8895bba85fe5340b34aafb3dce7650bd01f (diff) |
Use first type module instead of functors pt.2
Diffstat (limited to 'script.ml')
-rwxr-xr-x | script.ml | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -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 ); () |