Skip to content

Commit

Permalink
[svg] update arc fn, add great circle flag as arg
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jun 11, 2015
1 parent 72247ec commit babb6a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geom-svg/src/core.org
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ and will be automatically converted.
{:cx (*ff* x) :cy (*ff* y) :r radius})])

(defn arc
[center radius theta1 theta2 ccw? & [attribs]]
[center radius theta1 theta2 great? ccw? & [attribs]]
(let [radius (vec2 radius)
p (g/+ (vec2 center) (g/as-cartesian (vec2 (v/x radius) theta1)))
q (g/+ (vec2 center) (g/as-cartesian (vec2 (v/y radius) theta2)))]
(path [[:M p] [:A radius 0 0 (if ccw? 1 0) q]] attribs)))
(path [[:M p] [:A radius 0 (if great? 1 0) (if ccw? 1 0) q]] attribs)))

(defn rect
[[x y] w h & [attribs]]
Expand Down

0 comments on commit babb6a8

Please sign in to comment.