summaryrefslogtreecommitdiff
path: root/layer
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2020-12-28 21:17:20 +0100
committerSébastien Dailly <sebastien@chimrod.com>2020-12-28 21:17:20 +0100
commit9d65e5e6a5bd8666baf0d7d3e0474c721cafc683 (patch)
treec391ced8768eca6e2f0c8292bab10fceeb48f2ee /layer
parentec812521b31471ce9ac3d9bdf1288b1569defbc8 (diff)
Fixed width and angle sliddes
Diffstat (limited to 'layer')
-rwxr-xr-xlayer/svg.ml16
1 files changed, 6 insertions, 10 deletions
diff --git a/layer/svg.ml b/layer/svg.ml
index f174acc..f7cc670 100755
--- a/layer/svg.ml
+++ b/layer/svg.ml
@@ -2,10 +2,8 @@
open Brr
-module Path = Brr_canvas.C2d.Path
module V2 = Gg.V2
-
let svg : El.cons
= fun ?d ?at childs ->
El.v ?d ?at (Jstr.v "svg") childs
@@ -26,20 +24,19 @@ let move_to
= fun point path ->
let x, y = V2.to_tuple point in
- Jstr.append path @@
Jstr.concat ~sep:(Jstr.v " ")
- [ Jstr.v " M"
+ [ path
+ ; Jstr.v "M"
; Jstr.of_float x
; Jstr.of_float y ]
-
let line_to
: Gg.v2 -> 'a t -> 'a t
= fun point path ->
let x, y = V2.to_tuple point in
- Jstr.append path @@
Jstr.concat ~sep:(Jstr.v " ")
- [ (Jstr.v " L")
+ [ path
+ ; (Jstr.v "L")
; (Jstr.of_float x)
; (Jstr.of_float y) ]
@@ -49,9 +46,9 @@ let quadratic_to
let cx, cy = V2.to_tuple ctrl0
and cx', cy' = V2.to_tuple ctrl1
and x, y = V2.to_tuple p1 in
- Jstr.append path @@
Jstr.concat ~sep:(Jstr.v " ")
- [ (Jstr.v " C")
+ [ path
+ ; (Jstr.v "C")
; (Jstr.of_float cx)
; (Jstr.of_float cy)
; (Jstr.v ",")
@@ -65,4 +62,3 @@ let close
: 'a t -> 'a t
= fun path ->
Jstr.append path (Jstr.v " Z")
-