aboutsummaryrefslogtreecommitdiff
path: root/path/builder.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-01-09 11:35:40 +0100
committerSébastien Dailly <sebastien@chimrod.com>2021-01-09 11:35:40 +0100
commit329b774e315b41bc0d5b7daf8737222768c8d1f3 (patch)
tree94464c12dfa48d5fdb1508b9e8a115b4596d0e34 /path/builder.ml
parentc734c1b30fd1c58a0d42020859be31d89b92bcd0 (diff)
Formalized exchanges between worker and app
Diffstat (limited to 'path/builder.ml')
-rwxr-xr-xpath/builder.ml35
1 files changed, 18 insertions, 17 deletions
diff --git a/path/builder.ml b/path/builder.ml
index fd772ea..7901e78 100755
--- a/path/builder.ml
+++ b/path/builder.ml
@@ -133,15 +133,15 @@ module Make(Point:P) = struct
Repr.start p0 path
|> Repr.quadratic_to
- p0'
- b0.Shapes.Bezier.ctrl0
- b0.Shapes.Bezier.ctrl1
- p1'
+ ( p0'
+ , b0.Shapes.Bezier.ctrl0
+ , b0.Shapes.Bezier.ctrl1
+ , p1' )
|> Repr.quadratic_to
- p1'
- b1.Shapes.Bezier.ctrl0
- b1.Shapes.Bezier.ctrl1
- p2'
+ ( p1'
+ , b1.Shapes.Bezier.ctrl0
+ , b1.Shapes.Bezier.ctrl1
+ , p2' )
| (p0::_ as points) ->
let (let*) v f =
@@ -179,10 +179,10 @@ module Make(Point:P) = struct
let bezier = Array.get beziers (i - 1) in
path := Repr.quadratic_to
- !point
- bezier.Shapes.Bezier.ctrl0
- bezier.Shapes.Bezier.ctrl1
- pt
+ ( !point
+ , bezier.Shapes.Bezier.ctrl0
+ , bezier.Shapes.Bezier.ctrl1
+ , pt )
(!path);
point := pt;
)
@@ -195,11 +195,12 @@ module Make(Point:P) = struct
Repr.stop @@ List.fold_left beziers
~init:path
~f:(fun path bezier ->
- let p0' = bezier.p0
- and ctrl0 = bezier.ctrl0
- and ctrl1 = bezier.ctrl1
- and p1' = bezier.p1 in
- Repr.quadratic_to p0' ctrl0 ctrl1 p1' path
+ Repr.quadratic_to
+ ( bezier.p0
+ , bezier.ctrl0
+ , bezier.ctrl1
+ , bezier.p1 )
+ path
)
end