Skip to content

Commit

Permalink
ellipse-mode takes a keyword argument
Browse files Browse the repository at this point in the history
  • Loading branch information
rosado committed Sep 4, 2009
1 parent cdbdb01 commit 58af3a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rosado/processing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@
[a b c d]
(.ellipse *applet* (float a) (float b) (float c) (float d)))

(defn ellipse-mode [mode] (.ellipseMode *applet* (int mode)))
(defmacro ellipse-mode [mode]
"Takes a keyword argument; :center, :radius, :corner or :corners."
(let [mode (tosymb mode)]
`(.ellipseMode *applet* (int ~mode))))

(defn emissive-float
([gray] (.emissive *applet* (float gray)))
Expand All @@ -345,6 +348,7 @@
(defn end-raw [] (.endRaw *applet*))

(defmacro end-shape
"Takes an optinal :close keyword as argument."
([] `(.endShape *applet*))
([kind]
(let [kind (tosymb kind)]
Expand Down

0 comments on commit 58af3a7

Please sign in to comment.