    parameters set the location of the upper-left corner, the third
    sets the width, and the fourth sets the height. These parameters
    may be changed with rect-mode."
-  [x y width height]
-  (.rect (current-surface) (float x) (float y) (float width) (float height)))
+  ([x y width height]
+     (.rect (current-surface) (float x) (float y) (float width) (float height)))
+  ([x y width height r]
+     (.rect (current-surface) (float x) (float y) (float width) (float height) (float r)))
+  ([x y width height top-left-r top-right-r bottom-right-r bottom-left-r]
+     (.rect (current-surface) (float x) (float y) (float width) (float height)
+            (float top-left-r) (float top-right-r) (float bottom-right-r) (float bottom-left-r))))
 
 (def ^{:private true}
   rect-modes {:corner PApplet/CORNER

    :category "Data"
    :subcategory "Conversion"
    :added "1.0"}
    unbinary
  "Unpack a binary string to an integer. See binary for converting
  integers to strings."
  [str-val]
  (PApplet/unbinary (str str-val)))

(defn
  ^{:requires-bindings true

    :subcategory "3D Primitives"
    :added "1.0"}
  sphere
  "Generates a hollow ball made from tessellated triangles."
  [radius] (.sphere (current-surface) (float radius)))

(defn
