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 --- state.ml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'state.ml') diff --git a/state.ml b/state.ml index 52933f8..57007b3 100755 --- a/state.ml +++ b/state.ml @@ -210,19 +210,13 @@ let do_action ; v (Jstr.v "xmlns:xlink") (Jstr.v "http://www.w3.org/1999/xlink") ] (List.map state.paths ~f:(fun path -> - let repr = Paths.SVGRepr.create_path (fun _ -> ()) in - let path = Paths.SVGRepr.get @@ - Paths.Fixed.repr - path - (module Paths.SVGRepr) - repr in - - Layer.Svg.path - ~at:Brr.At.[ - v (Jstr.v "fill") backgroundColor - ; v (Jstr.v "stroke") backgroundColor - ; v (Jstr.v "d") path ] - [] + + Paths.to_svg + ~color:backgroundColor + (module Paths.Fixed) + path + `Fill + )) in let content = El.prop Elements.Prop.outerHTML svg in -- cgit v1.2.3