                  (float (+ y (/ height 2))))))
 
 (defmethod draw-primitive String
-  [g2d text {:keys [x y font fill stroke]}]
+  [g2d text {:keys [x y font fill stroke] :as params}]
   (let [{:keys [name bold italic underline strikethrough size]} font
         style (bit-or (if bold Font/BOLD 0) (if italic Font/ITALIC 0))
         font1 (Font. name style size)

  (doseq [[type params inner] items]
    (when type
    (let [params+ (complete-coordinates params)]
      (with-g2d-state [g2d params+]
                      (draw-primitive g2d (make-obj type params+) params+))))))

(defn paint-canvas-graphics [^Graphics graphics data]
  (draw-primitives graphics data))

      (.. getContentPane (add scroll-pane))
      .show)))

(def img (read-image "/Users/arthur/Desktop/flea.png"))

(count
(reset!
  grafix 
  [
   [:round-rect
    {:l 20 :t 10 :w 300 :h 300
     :arc-radius 100
     :fill {:color :pink}
     :scale 1.3
     :stroke {:color 0xE06060
              :cap :round
              :width 5
              :dashes [10 10] :dash-phase 0}
     :rotate 50}]
   [:ellipse
    {:l 25 :t 15 :w 110 :h 90
     :fill true :color :yellow :alpha 0.5 :stroke {:width 10 :cap :round :dashes [20 20]}}]
   [:polyline
    {:vertices [{:x 100 :y 100}
                {:x 50 :y 150}
