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 /state.ml | |
parent | af88c8895bba85fe5340b34aafb3dce7650bd01f (diff) |
Use first type module instead of functors pt.2
Diffstat (limited to 'state.ml')
-rwxr-xr-x | state.ml | 20 |
1 files changed, 7 insertions, 13 deletions
@@ -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 |