 
 (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
 


;; $$beginRecord

(defn begin-shape
  ([] (.beginShape *applet*))
  ([kind] (.beginShape *applet* (int kind))))

(defn bezier
  ([x1 y1 x2 y2 x3 y3 x4 y4]

     (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:
