       .show)))
 
 (def img (read-image "/Users/arthur/Desktop/flea.png"))
+
+; shape
+; stroke color
+; fill color/pattern/image
+; rotate
+; scale
+; font
+; text
+; alpha
+
 
 (count
 (reset!

         (filter second)
         (into {}))))
   
(defmulti make-obj (fn [obj-keyword params] obj-keyword))

(defmethod make-obj :arc
  [_ {:keys [l t w h start-angle arc-angle arc-boundary closed]}]

                       (draw-string-center g2d text x y))
      )))

(defn draw [g2d items]
  (enable-anti-aliasing g2d)
  (doseq [[type params & inner-items] items]
    (let [params+ (complete-coordinates params)]
       (if (= type :compound)
         (draw g2d inner-items)
         (draw-primitive g2d (make-obj type params+) params+)
         ))))

(defn canvas [reference]
  (let [panel (proxy [JPanel] []
                (paintComponent [^Graphics graphics]
                                ;(proxy-super paintComponent graphics)
                                (draw graphics @reference)))]
    (add-watch reference panel (fn [_ _ _ _]
                                 (.repaint panel)))
    panel))
