From 74cd42c5cae6644914334448e198d562f4145511 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 1 Jan 2021 16:48:23 +0100 Subject: Use first type module instead of functors pt.2 --- script.ml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'script.ml') 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 ); () -- cgit v1.2.3