aboutsummaryrefslogtreecommitdiff
path: root/state.ml
diff options
context:
space:
mode:
Diffstat (limited to 'state.ml')
-rwxr-xr-xstate.ml20
1 files changed, 7 insertions, 13 deletions
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