From 58af3a7e1f698a5b5f59ce93aba815785e70de6a Mon Sep 17 00:00:00 2001 From: Roland Sadowski Date: Fri, 4 Sep 2009 22:00:55 +0200 Subject: [PATCH] ellipse-mode takes a keyword argument --- src/rosado/processing.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rosado/processing.clj b/src/rosado/processing.clj index 8eb7227..23e27f4 100644 --- a/src/rosado/processing.clj +++ b/src/rosado/processing.clj @@ -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))) @@ -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)]