                            RenderingHints/VALUE_ANTIALIAS_OFF)))))
 
 (def default-primitive-params
-  {:filled false :color Color/BLACK})
+  {:filled false :color :black})
 
 (def stroke-caps
   {:butt BasicStroke/CAP_BUTT

   [:primitive-round-rect
    {:l 20 :t 10 :w 300 :h 300
     :arc-radius 100
     :filled true :color Color/PINK
     :rotate 50}]
   [:primitive-round-rect
    {:l 20 :t 10 :w 300 :h 300
     :arc-radius 100 :rotate 50
     :filled false :color Color/DARK_GRAY
     :stroke {:width 5
              :cap :round
              :dashes [11 10] :dash-phase 0}}]
   [:primitive-ellipse
    {:l 25 :t 15 :w 110 :h 90
     :filled true :color Color/YELLOW :alpha 0.5}]
   [:primitive-polygon
    {:vertices [{:x 100 :y 100}
                {:x 50 :y 150}

   :round BasicStroke/JOIN_ROUND
   :bevel BasicStroke/JOIN_BEVEL})

(def colors
  {:red Color/RED
   :blue Color/BLUE
   :green Color/GREEN
   :cyan Color/CYAN
   :magenta Color/MAGENTA
   :yellow Color/YELLOW
   :pink Color/PINK
   :orange Color/ORANGE
   :black Color/BLACK
   :white Color/WHITE
   :gray Color/GRAY
   :grey Color/GRAY
   :dark-gray Color/DARK_GRAY
   :dark-grey Color/DARK_GRAY
   :light-gray Color/LIGHT_GRAY
   :light-grey Color/LIGHT_GRAY
   })

(defn color-object [color]
  (cond
    (integer? color) (Color. color)
    (keyword? color) (colors color)
    (string? color)  (colors (keyword color))
    :else            color))

(defn set-g2d-state [g2d {:keys [alpha color stroke rotate x y scale]}]
  (doto g2d
    (.setColor (color-object (or color :black)))
    (.setComposite (if (or (not alpha) 
                           (= alpha 1))
                     AlphaComposite/Src
