 
 (defn end-raw [] (.endRaw *applet*))
 
-(defn end-shape
-  ([] (.endShape *applet*))
-  ([mode] (.endShape *applet* (int mode))))
+(defmacro end-shape
+  ([] `(.endShape *applet*))
+  ([kind]
+     (let [kind (tosymb kind)]
+       `(.endShape *applet* (int ~kind)))))
 
 ;; $$exec
 

;; used by functions in this lib. Use binding to set it
;; to an instance of processing.core.PApplet
(def #^PApplet *applet*)

(defn abs-int [n] (PApplet/abs (int n)))


     (pop-matrix)))

(defmacro with-rotation
  "Performs body with rotation, restores current transformation on exit.
  Accepts a vector [angle] or [angle x-axis y-axis z-axis].

  Example:
